Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OK! This is interesting
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00655074
Message ID:
00655237
Views:
21
>>Frank,
>>
>>Datetimes are accurate to the millisecond but we can only access the seconds. This si why you are getting the rounding error. Better than round() in this situation is ceiling() as in;
>>
>>lnSecs = CEILING(DT1 - DT2)
>
>Why it's better?

IMO, CEILING() is the math operation to return the next higher integer, round() is the math operation to round off either up or down to a fixed number of decimals. Ceiling is the more appropriate math opreation for this situation as the desired result is always the next higher integer never a non-integer or a lower value.
Previous
Reply
Map
View

Click here to load this message in the networking platform