[ Oracle date to unixtime ]
-- 파라미터1개 (날짜)
-- 날 짜(2009-09-08 16:29:30)
*/
create or replace function DATE2INT(date_time in date)
return number
is
RetVal number;
begin
select ((trunc(date_time - to_date('19700101', 'yyyymmdd'))*86400-32400) + to_char(date_time,'sssss')) into RetVal from dual;
return(RetVal);
end DATE2INT;
/
No comments:
Post a Comment