A personal blog of Christopher Wigginton; a nerd by nature, programming polyglot, cooking enthusiast and fermentation practitioner.
Friday, March 1, 2019
Grabbing UTC Hour from Oracle
A simple sql script for obtaining gmt hour from Oracle
select sys_extract_utc(systimestamp) as UTC,
extract(hour from sys_extract_utc(systimestamp) ) as UTC_HOUR,
extract(hour fromcast(to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS') astimestamp) ) as local_hour
from dual
No comments:
Post a Comment