SQL and Daylight Savings time

  • Thread starter Thread starter Greg Green
  • Start date Start date
G

Greg Green

I'm looking for Web resources detailing how daylight savings time is/should
be dealt with; specific reference to Access built-in functions are helpful
if there are any. We will ultimately be upsizing to SQL Server, I could use
SQL Server functions through pass-through queries if SQL Server has better
inherent resources for this issue.

Users of my application conceptualize a "25th hour" in October for the fall
back, totals have to include that hour twice (the hour occurs twice in their
minds). In my experience, changing a user's hard-arrived-at understanding of
a data structure is both difficult and dangerous!

Thanks in advance, Greg
 
Hi,


The easier way to do it is to store the date_time in UTC, so, it is not
affected by daylight saving, and you can immediately know simultaneity
between events just looking at it (by opposition, is something occurring at
13h00 in Moscow is simultaneous, or not, with something occurring at 13h00
in Athens) which may be interesting in states having more than one time zone
(like Arizona, or is it Utah, with local political regions making it
possible to be in one of 4 time zone ). Using UTC solves those problems, but
people prefer to get date_and_time accordingly to their PC settings. You can
use the WIN32 API to transfer the UTC time to format it accordingly to the
time zone described in the setting, that may be easier in procedural
language than in SQL, so easier in VBA, unless you wait until the next
release of MS SQL Server that should support dot-net languages.

You may take a look at the VBA example in
http://www.mvps.org/access/api/api0024.htm


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top