Skip to content

Instantly share code, notes, and snippets.

View stephanheinze's full-sized avatar

Stephan Heinze stephanheinze

View GitHub Profile
@tomask-de
tomask-de / java-ts-to-date-from-oracle-number.sql
Last active April 21, 2016 10:55
Convert a Java timestamp (long value) saved in an Oracle database as NUMBER(16) into a readable string
-- 2177452800000000 = diff from 01.01.1970 00:00:00.000000 to 01.01.1901 00:00:00.000000
select timestamp '1970-01-01 00:00:00' + numtodsinterval((STAMP - 2177452800000000)/1000/1000,'SECOND') from DUAL;