Issue with TIME fields.

Russ Tyndall fitzbew at nc.rr.com
Wed Sep 13 09:48:40 CDT 2006


On 9/13/06 3:36 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> I have check all sources and places where we assign time values,
> I do not see how this bits can catch garbage.
> 
> So my question to you is: WHAT WAY you have to use to assign time or
> datetime value into database?

By the way, I usually populate Date/time fields like this:
    
Dim dateNewDate as New Date
    
dateNewDate.Year = Val(EditField2(0).Text)
dateNewDate.Month = Val(EditField2(1).Text)
dateNewDate.Day = Val(EditField2(2).Text)
    
rstCursorToChange.DateField("actiondate").Year = dateNewDate.Year
rstCursorToChange.DateField("actiondate").Month = dateNewDate.Month
rstCursorToChange.DateField("actiondate").Day = dateNewDate.Day

In the test project, I set a Time field like this:

If rstCursorToChange.TimeField("timer_time").IsNull = True Then
   rstCursorToChange.TimeField("timer_time").Hour = 12
   rstCursorToChange.TimeField("timer_time").Minute = 0
   rstCursorToChange.TimeField("timer_time").Second = 0
End If

To clarify, the table in which I have observed this problem has Date fields
and Time fields, but no DateTime fields.  My earlier email was incorrect
when it mentioned datetime fields.

-- 
Russ Tyndall
Wake Forest, NC
 



More information about the Valentina mailing list