SQL> SET SERVEROUTPUT ON
SQL> DECLARE
2 v_sysdate DATE := SYSDATE;
3 v_date DATE;
4 v_char VARCHAR2(20);
5 BEGIN
6
7
8 DBMS_OUTPUT.PUT_LINE('Today''s Date: '||v_sysdate);
9
10
11 v_date := TO_DATE(v_char, 'DD:MM:YYYY HH24:MI:SS');
12 DBMS_OUTPUT.PUT_LINE('Convert back to DATE format: '||v_date);
13
14 END;
15 /
Today's Date: 26-OCT-09
Convert back to DATE format:
PL/SQL procedure successfully completed.
SQL>
SQL>
|