Coverts date to Unix Epoch time
function date2epoch(
p_date in date)
return number
Name | Description |
---|---|
p_date |
Date to convert to Epoch format |
return | Unix Epoch time |
select oos_util_date.date2epoch(sysdate)
from dual;
OOS_UTIL_DATE.DATE2EPOCH(SYSDATE)
---------------------------------
1461663997
Converts Unix linux time to Oracle date
function epoch2date(
p_epoch in number)
return date
Name | Description |
---|---|
p_epoch |
Epoch Unix date (number) |
return | date |
select oos_util_date.epoch2date(1461663982)
from dual;
OOS_UTIL_DATE.EPOCH2DATE(1461663982)
------------------------------------
26-APR-2016 12:46:22