Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Over midnight causes bug
Message
De
04/07/2001 11:20:26
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00526579
Message ID:
00526690
Vues:
19
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform