Oracle equaivalent of java System.currentTimeMillis()?

后端 未结 4 1283
闹比i
闹比i 2021-02-02 00:37

I want to be able to store the current time in milliseconds in an Oracle number field. How do I do this via a query?

select systimestamp from dual; 
4条回答
  •  南旧
    南旧 (楼主)
    2021-02-02 01:13

    this link helps for all languages currentmillis.com for oracle:

    SELECT (SYSDATE - TO_DATE('01-01-1970 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) * 24 * 60 * 60 * 1000 FROM DUAL
    

提交回复
热议问题