Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return centesimal or millesimal seconds with Datetime()
Message
De
04/12/1998 13:36:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00164082
Message ID:
00164173
Vues:
30
>John,
>
>>You can't. DateTime data types do not have the precision to be more detailed than seconds.
>
>It depends...
>
>In VFP we can't directly deal with subseconds. The OLE DateTime value though contains milliseconds. If something like VC++ is sending values to a VFP server those milliseconds can be a real PITA. I'll tell you it took a couple of hours tracking this little problem down and involved a hex file viewer.. it wasn't pretty *s*

You want to try something that will drive you crazy?

date1 = DATE()
date2 = date1 + .1

? date1,date2

? date1=date2 && = .F. !!!


I ran into this problem with some code that was adding non-integer values to dates. Boy, talk about a tough lesson to learn (and track down)!

You look at the dates in the debugger and everything looks cool. I guess some things are more equal than others no matter how equal they may "appear".
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform