Right now I am using a hardcoded literal for the time zone difference. The number 21600 as 6 hours. Since I am in Central Time it will be either 5 or 6 hours. I would like to replace the 21600 with a function that returns the offset as a number.
where 1=1
and alog.access_instant >=
(trunc(to_date('01/24/2012','MM/DD/YYYY') - to_date('12/31/1840','MM/DD/YYYY'),0)*86400)+21600
and alog.access_instant < (trunc(to_date('01/25/2012','MM/DD/YYYY') - to_date('12/31/1840','MM/DD/YYYY'),0)*86400)+21600
I can get the time zone abbr but not the number.
select
FROM_TZ(CAST('01-JUL-12' AS TIMESTAMP), 'America/Chicago')
from dual
I appreciate any help. Thank you.
where 1=1
and alog.access_instant >=
(trunc(to_date('01/24/2012','MM/DD/YYYY') - to_date('12/31/1840','MM/DD/YYYY'),0)*86400)+21600
and alog.access_instant < (trunc(to_date('01/25/2012','MM/DD/YYYY') - to_date('12/31/1840','MM/DD/YYYY'),0)*86400)+21600
I can get the time zone abbr but not the number.
select
FROM_TZ(CAST('01-JUL-12' AS TIMESTAMP), 'America/Chicago')
from dual
I appreciate any help. Thank you.