Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.
-
aruneeshsalhotr #1
Re: accounting for daylight savings time
Hi
If you need to account for daylight savings, you could use the following
SQL query to detect the same
select SYSDATE x, 0 r1 from dual where SYSDATE between (select
decode(to_char(to_date('04/01/2003','MM/DD/YYYY'),'D'),1,
to_date('04/01/2003','MM/DD/YYYY')+7, 2,
to_date('04/01/2003','MM/DD/YYYY')+6, 3,
to_date('04/01/2003','MM/DD/YYYY')+5, 4,
to_date('04/01/2003','MM/DD/YYYY')+4, 5,
to_date('04/01/2003','MM/DD/YYYY')+3, 6,
to_date('04/01/2003','MM/DD/YYYY')+2,
to_date('04/01/2003','MM/DD/YYYY')) sday1 from dual) and (select
decode(to_char(to_date('09/01/2003','MM/DD/YYYY'),'D'),1,
to_date('09/01/2003','MM/DD/YYYY')+7, 2,
to_date('09/01/2003','MM/DD/YYYY')+6, 3,
to_date('09/01/2003','MM/DD/YYYY')+5, 4,
to_date('09/01/2003','MM/DD/YYYY')+4, 5,
to_date('09/01/2003','MM/DD/YYYY')+3, 6,
to_date('09/01/2003','MM/DD/YYYY')+2,
to_date('09/01/2003','MM/DD/YYYY')) sday2 from dual);
--
Posted via [url]http://dbforums.com[/url]
aruneeshsalhotr Guest
-
Daylight Savings Time
Using the Date object, I can get the timezone (eg: GMT-4 is current for EDT, EST would return GMT-5). WHat I need help with is determining, from a... -
Daylight Savings Time fix and CFDOCUMENT
After our webmaster installed the JVM update (1.4.2_13) to correct the DST issue, I discovered that CFDOCUMENT doesn't seem to function. Has anyone... -
ColdFusion 5 and Daylight Savings Time
Is Cold Fusion 5 affected by the change in Daylight Savings Time that's coming up? If so, is there a resolution? -
CF MX and Daylight Savings Time Change
Next year 2007, the Daylight Saving day (chaning the clocks for spring and fall) will be changing. The Spring date will be a month earlier and the... -
[PHP] Timezones and Daylight Savings Time
What if you set the server to use UTC and then used the clients local system setting to offset it for each client? So the server would have it's...



Reply With Quote

