I have a data source which is sending TIMESTAMP data in LONG integer format and we have to convert it into TIMESTAMP in Oracle. I can do it in JAVA very easily. However, I am not sure how can this be achieved in ORACLE. TO_TIMESTAMP is giving invalid month error.
Sample data - 1636070400000
Java snippet
import java.sql.Timestamp;
public class MyClass {
public static void main(String args[]) {
long timeStamp = 1636070400000L;
Timestamp stamp = new Timestamp(timeStamp);
System.out.println("Timestamp is "+stamp);
}
}
Above snippet returns - 2021-11-05 00:00:00.0
I want output in similar format in SQL to manipulate the data further (YYYY-MM-DD HH24:MI:SS).