View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Daylight Saving Time (DST) and calculating time difference.

The elapsed time between two time values are not affected by DST.

Dim StartTime As Date
Dim EndTime As Date
Dim ElapsedTime As Date
EndTime = TimeSerial(18, 0, 0) ' 6:00 PM
StartTime = TimeSerial(12, 0, 0) ' Noon
ElapsedTime = EndTime - StartTime ' 6 Hours
Debug.Print Format(ElapsedTime, "hh:mm:ss")


Where and in what way would DST possibly affect the calculation above?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"Blue Knight" <Blue wrote in message
...
We use excel to track the number of hours / minutes from the placing of a
order and when it was complete. It appears that excel does not take in the
new US daylight saving time into affect when looking at elasped time or
time
range calculation.

Are there any patches being planned by microsoft specifically for excel or
access or sql for use with the new daylight saving time? (So that from
Noon
on Saturday to Noon on Sunday will count as 23 and not 24 hours)