PRB: DateTime Subtraction May Not Produce an Exact Integer (258998)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q258998 SYMPTOMS
When subtracting two DateTimes, the result is a floating point number. As such, the displayed value may not be the exact value. This may lead to further inaccuracies.
CAUSE
Floating point math is frequently inaccurate in any language.
RESOLUTION
When subtracting DateTimes, use ROUND(nDifference, 0) to ensure that you are working with the value you think you are.
Modification Type: | Major | Last Reviewed: | 4/11/2000 |
---|
Keywords: | kbDSupport kbprb kbXBase KB258998 kbAudDeveloper |
---|
|