Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Precision problem???
Message
From
14/03/2014 15:50:03
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01596565
Message ID:
01596569
Views:
40
>Hi everybody,
>
>I have strange problem. In SQL Server we have these two datetime values:
>
>2014-03-04 09:30:00.000	2014-03-04 10:00:00.000
>
>In VFP I have the following script
>
>(end_time - start_time)/3600
>
>and compare it with .5
>
>If it's less than .5 it should be true and otherwise it should be false.
>
>So, as we see here, the duration is exactly half an hour and I should get false. But I am getting true and I am not sure why and what may be wrong.

1. Show your actual code, not pseudocode. In the past you've wasted my time and that of others by going off on a wild goose chase

2. How are you getting the SQL Server values into VFP? Are you sure the values you're getting are what you expect i.e. you've debugged/traced it?
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform