把unix 时间戳 转化成oracle中日期类型
create or replace function unix_to_oracle(in_number NUMBER) return date is begin
return(TO_DATE('19700101','yyyymmdd') + in_number/86400 +TO_NUMBER(SUBSTR(TZ_OFFSET(sessiontimezone),1,3))/24);
end unix_to_oracle;
把oracle中日期类型转化成 时间戳
create or replace function oracle_to_unix(in_date IN DATE) return number is
begin
return((in_date -TO_DATE('19700101','yyyymmdd'))*86400-TO_NUMBER(SUBSTR(TZ_OFFSET(sessiontimezone),1,3))*3600);
end oracle_to_unix;
http://zhouyundong0482.blog.163.com/blog/static/10351792008226112412328/
浙公网安备 33010602011771号