Explicit declaration of format mask : Date Type Convert « PL SQL Data Types « Oracle PL/SQL Tutorial






SQL>
SQL> declare
  2    v_temp_dt DATE;
  3    v_count_nr NUMBER(10);
  4  begin
  5
  6    -- Explicit declaration of format mask.
  7    v_temp_dt := to_DATE('01-JAN-2007','dd-mon-yyyy');
  8
  9  end;
 10  /

PL/SQL procedure successfully completed.

SQL>








21.11.Date Type Convert
21.11.1.Use TO_CHAR in PL/SQL
21.11.2.Assign the string to a date variable. The conversion is implicit.
21.11.3.Assign that date variable to another string
21.11.4.Explicit declaration of format mask
21.11.5.Explicit declaration of format mask in where clause
21.11.6.Determine and display years and months