Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 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