New ANSI DATE literal.
SQL>
SQL> CREATE TABLE T (
2 c1 DATE,
3 c2 TIMESTAMP,
4 c3 TIMESTAMP WITH TIME ZONE,
5 c4 TIMESTAMP WITH LOCAL TIME ZONE
6 );
Table created.
SQL>
SQL> DECLARE
2
3 v1 DATE;
4 v2 TIMESTAMP;
5 v3 TIMESTAMP WITH TIME ZONE;
6 v4 TIMESTAMP WITH LOCAL TIME ZONE;
7
8 BEGIN
9 v1 := DATE '2002-11-01';
10 dbms_output.put_line(v1);
11
12 END;
13 /
01-NOV-02
PL/SQL procedure successfully completed.
SQL>
SQL> select to_Char(c1, 'yyyy-mm-dd hh:mi:ss'), c2,c3,c4 from t;
no rows selected
SQL> DROP TABLE T;
Table dropped.
Related examples in the same category