Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Precision in DateTime Arithmetic
Message
From
29/11/2012 18:45:46
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Precision in DateTime Arithmetic
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01558431
Message ID:
01558431
Views:
91
Suppose you have 2 different datetime values t1 and t2.

If you subtract them e.g. t2 - t1, you get the time difference in seconds. Actually it seems to be the FLOOR() of the difference i.e.

- anything less than 1 second returns 0
- anything less than 2 seconds, but greater to or equal to 1 second, returns 1
- etc.

My understanding is that as an 8-byte type, DateTime values are stored with considerable precision, of the order of about 10 milliseconds (?) Is there any way to calculate differences with more precision?

I understand SECONDS() can be used to get more precision, but what I'm dealing with are DateTime values stored in tables.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Next
Reply
Map
View

Click here to load this message in the networking platform