[AccessD] TimeSerial buggy for negative date values

Gustav Brock Gustav at cactus.dk
Sun Apr 23 13:41:35 CDT 2006


Hi Marty

No problem with CVDate(). In fact, I use CVDate in the TimeSerialFull() function. It's the native TimeSerial() that's buggy.
By the way, the code line to obtain the buggy output is:

For i = 8 To -8 Step -1 : d = TimeSerial(0, 360 * i, 0) : ? CDbl(d), Format(d, "yyyymmdd hhnn") : Next

/gustav

>>> martyconnelly at shaw.ca 23-04-2006 20:28:33 >>>
I thought this was by design. How else do you get Shakespeare's birthday?
?CVDate(-122607)

Gustav Brock wrote:

>Hi all
>
>Did you know that for Access up to and including version 2003 return wrong date/time values when the parameters will result in a negative value?
>This test shows that the returned value is a simple sequential numeric value which, however, provides faulty date values when these are negative.
>
>Put in the debug window this line and press enter to obtain the output:
>
>For i = 8 To -8 Step -1 : d = TimeSerialReal(0, 360 * i, 0) : ? CDbl(d), Format(d, "yyyymmdd hhnn") : Next





More information about the AccessD mailing list