Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DateTime Calculation Problems
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
DateTime Calculation Problems
Miscellaneous
Thread ID:
00199527
Message ID:
00199527
Views:
35
I've noticed that Calculations involving DateTime Values combined with INT, MOD or / sometimes act strangely

For Example:

I've observed the following:

X = {04/22/1999 16:00:00} - {04/22/1999 15:00:00})
?INT(X/60)

X = ROUND({04/22/1999 16:00:00} - {04/22/1999 15:00:00}, 2)
?INT(X/60)


The First result yields the incorrect number of 59

The Second pass yields a correct number of 60.


I suspect that the problem has to do with how VFP internally handles precision as regards to datetime calculations.

Marshal Rosenberg
Marshal_Rosenberg@Compuserve.Com
Next
Reply
Map
View

Click here to load this message in the networking platform