SQL>
SQL> DECLARE
2 date_in DATE := TO_DATE('24-Feb-2002 05:36:00 PM','DD-MON-YYYY HH:MI:SS AM');
3 trunc_to_year DATE;
4 trunc_to_month DATE;
5
6 BEGIN
7 trunc_to_month := TRUNC(date_in,'MM');
8
9 DBMS_OUTPUT.PUT_LINE(TO_CHAR(trunc_to_month,'DD-MON-YYYY HH:MI:SS AM'));
10 END;
11 /
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL>
|