How to get 4 digit year in pl/sql?
select TO_DATE ('99991231', 'yyyymmdd')
from dual;
The above query gives output as --> 12/31/9999
but using the same in pl/sql it gives --> 31-DEC-99
declare
v_date varchar2(12) := '99991231';
v_tmp date;
begin
select TO_DATE (v_date, 'yyyymmdd') into v_tmp
from dual;
dbms_output.put_line(v_tmp);
end;
I would like to see 12/31/9999 in pl/sql. How can i do this?