Last active
January 14, 2019 07:27
-
-
Save bhachauk/ea330131c987e86b6329ad9b0c81c902 to your computer and use it in GitHub Desktop.
Accessing the Unix time in Oracle database with specific date format in SQL query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEFINE cnv_time = "24 * 60 * 60 * 1000"; | |
select TIMESTAMP '1970-01-01 00:00:00.000' + NUMTODSINTERVAL(TIME / 1000, 'SECOND') as dat FROM FM_ALARM_11_12_2018 where | |
to_number(to_date('01-JAN-2019 10:00:00','DD-MON-YYYY HH24:MI:SS') - to_date('01-JAN-1970','DD-MON-YYYY')) * &cnv_time > TIME; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment