Oracle Database. Getting Unix-like timestamp in sql. Получение времени как в Unix посредством sql
Я использовал следующий SELECT:
select
extract( day from diff )*24*60*60*1000 +
extract( hour from diff )*60*60*1000 +
extract( minute from diff )*60*1000 +
round(extract( second from diff )*1000) total_milliseconds
from
(
select
(
systimestamp - TO_TIMESTAMP('01/01/1970
00:00:00', 'MM-DD-YYYY
HH24:MI:SS')
) diff
from
dual
)