Any ideas as to why the following line complains that DATEPART is not defined as an identifier?
IF DATEPART(v_ExpireTime, year) = 1899 THEN v_ExpireTime := NULL;
It returns:
Error(68,10): PLS-00201: identifier 'DATEPART' must be declared
EDIT: Never mind, I found the answer. I now do:
IF to_number(to_char(v_ExpireTime, 'YY')) = 1899 THEN v_ExpireTime := NULL;