Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ckaminski/19052bf6061eb2dc0957 to your computer and use it in GitHub Desktop.
Save ckaminski/19052bf6061eb2dc0957 to your computer and use it in GitHub Desktop.
SELECT EXTRACT(day FROM(sys_extract_utc(TO_TIMESTAMP_TZ('2016-03-11 13:00:00 -5:00', 'YYYY-MM-DD HH24:MI:SS TZH:TZM')) -
to_timestamp('1970-01-01', 'YYYY-MM-DD'))) * 86400000
+ to_number(to_char(sys_extract_utc(TO_TIMESTAMP_TZ('2016-03-11 13:00:00 -5:00', 'YYYY-MM-DD HH24:MI:SS TZH:TZM')),
'SSSSSFF3')) FROM DUAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment