September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
32
Task/Date-manipulation/SQL/date-manipulation.sql
Normal file
32
Task/Date-manipulation/SQL/date-manipulation.sql
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
-- March 7 2009 7:30pm EST
|
||||
|
||||
select
|
||||
TO_TIMESTAMP_TZ(
|
||||
'March 7 2009 7:30pm EST',
|
||||
'MONTH DD YYYY HH:MIAM TZR'
|
||||
)
|
||||
at time zone 'US/Eastern' orig_dt_time
|
||||
from dual;
|
||||
|
||||
-- 12 hours later DST change
|
||||
|
||||
select
|
||||
(TO_TIMESTAMP_TZ(
|
||||
'March 7 2009 7:30pm EST',
|
||||
'MONTH DD YYYY HH:MIAM TZR'
|
||||
)+
|
||||
INTERVAL '12' HOUR)
|
||||
at time zone 'US/Eastern' plus_12_dst
|
||||
from dual;
|
||||
|
||||
-- 12 hours later no DST change
|
||||
-- Arizona time, always MST
|
||||
|
||||
select
|
||||
(TO_TIMESTAMP_TZ(
|
||||
'March 7 2009 7:30pm EST',
|
||||
'MONTH DD YYYY HH:MIAM TZR'
|
||||
)+
|
||||
INTERVAL '12' HOUR)
|
||||
at time zone 'US/Arizona' plus_12_nodst
|
||||
from dual;
|
||||
Loading…
Add table
Add a link
Reference in a new issue