Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Over midnight causes bug
Message
From
04/07/2001 11:20:26
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00526579
Message ID:
00526690
Views:
18
Andrew,

>Hi Gavin,
>
>The datetime() approach works well when the resulution required is 1 second or greater. Seconds() returns down to 100ths of a second.
>
>On a different note, remember that you can use strict date literals if your code below read
>
>dtStartTime   = {^2001-07-04 11:59:59 PM}
>dtEndTime     = {^2001-07-04 12:00:01 AM}
>nTotalSeconds = dtEndTime - dtStartTime
>
>it would work regardless of SET("DATE") - note the caret before the year.
>

>snip<

Except the day for dtEndTime should be '05' rather than '04'. Otherwise you get -86398. <g>
Best,


DD

A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform