Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Day light savings issue
Message
From
07/11/2007 09:17:47
Walter Meester
HoogkarspelNetherlands
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Day light savings issue
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01267255
Message ID:
01267255
Views:
58
All,

A client called about an incorrect calculation of the time (hrs) between two events. I was calculating the time by using ROUND(DateTime2 - DateTime1)/3600,0). However this does not take into account change of time because of daylight savings.

I'm aware that Windows does store the date and time somewhere on which the daylight saving time change happens. It needs to pick it up from the regional settings as the software is running in many different countries, with and without daylight savings.

Is there an easy way of calcutating the number of hours between two events and taking day light savings into account.

BTW, I need to do this in VFP and SQL ...

Thanks in advance,

Walter,
Next
Reply
Map
View

Click here to load this message in the networking platform