I have a problem with converting NUMBER field to ORACLE date.
The problem is field holds a value 1285666505575 which consists of 13 digits.
I thought that this is standard timestamp value but current timestamp time consists of 10 digits (check it here).
The field is set from JAVA code.
I would like to convert this number to dd-mm-yyyy human format.
Could you give some suitable advises?
Thanks in advance!
With help of @Jesper i found this solution.
select TO_DATE('01/01/1970 00:00:00','DD/MM/YYYY HH24:MI:SS') + (1285666505575 /1000/60/60/24) from dual
The Unix timestamp (that your link refers to) counts the number of seconds since 01-01-1970.
Java counts the time using a number of milliseconds since 01-01-1970. So it’s not a surprise that this has three digits more than the Unix timestamp.
You can pass that number to the constructor of
java.util.Date. Example: