以下代码实现Unix到Oracle的日期转换。
CREATE OR REPLACE FUNCTION Unix_To_Oracle_Date
(
p_unix_date IN NUMBER, -- Range of = 0
p_num_hr_gmt_diff IN PLS_INTEGER -- Range of -24 to +24
) RETURN DATE AS
/*
Function Name: Unix_To_Oracle_Date
Purpose: To calculate an Oracle date based on a Unix GMT date
in seconds, since the epoch of Unix (January 1st, 1970).
The date returned will be based on the number of hours
the oracle database ...[ 查看全文 ]