CREATE OR REPLACE FUNCTION TGATE_NI.DATE2TS (m_date_real IN DATE)
RETURN NUMBER IS
m_unix_start_date_real DATE;
m_days_difference NUMBER;
timeoutput NUMBER;
BEGIN
m_unix_start_date_real := TO_DATE('19700101 0000', 'YYYYMMDD HH24MI');
m_days_difference := (m_date_real - m_unix_start_date_real);
timeoutput := (m_days_difference * 86400) - 28800;
return timeoutput;
END;
/
No comments:
Post a Comment