Year 2000 problems? Note the effect of using rr instead of yy : TO CHAR « PL SQL Programming « Oracle PL/SQL Tutorial






SQL>
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
  2    d1    DATE;
  3    d2    DATE;
  4    d3    DATE;
  5    d4    DATE;
  6    n1    NUMBER;
  7    n2    NUMBER;
  8    n3    NUMBER;
  9   BEGIN
 10    d4 := TO_DATE('1/1/02','mm/dd/rr');
 11
 12    DBMS_OUTPUT.PUT_LINE('d4 = ' || TO_CHAR(d4,'Dy, Mon dd, yyyy'));
 13
 14  END;
 15  /
d4 = Tue, Jan 01, 2002

PL/SQL procedure successfully completed.

SQL>








24.6.TO CHAR
24.6.1.Use TO_CHAR function in PL/SQL
24.6.2.Use TO_CHAR function in DBMS_OUTPUT.PUT_LINE
24.6.3.TO_CHAR(d3,'Day, Month dd, yyyy')
24.6.4.Year 2000 problems? Note the effect of using rr instead of yy
24.6.5.TO_CHAR(n1,'999D99')