DATE

= = =TO_DATE = = TO_DATE('character string', 'format model') = = = = = =  __DESCRIPTION__: To convert a character string to a date format, use;   = = = = = =  __DEFINITION:__ Used for date and time values. Internally, Oracle stores dates as numbers and by default DATE information is displayed as DD-MON-YY (ex: 01-JAN-09)   = = = = = =  __FUNCTION ARGUMENT:__ This conversion takes a nondate value character string such as "November 3, 2001" and convert the date value. = = = =__ EXAMPLE: __ = = = = = =SELECT id, TO_CHAR(event_date, 'MONTH DD, YYYY') = =<span style="font-size: 80%; color: #000080; font-family: 'Courier New', Courier, monospace;">FROM d_events; = =<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;">__ID TO_CHAR(EVENT_DATE, 'MonthDD, YYYY')__ = =<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;">100 May 14, 2004 = =<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;">105 April 28, 2004 = =<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;"> = =<span style="font-size: 80%; color: #000080; font-family: 'Courier New', Courier, monospace;"> = =<span style="font-size: 80%; color: #000080; font-family: 'Courier New', Courier, monospace;">SELECT TO_CHAR(event_date, 'fmMonthdd, RRRR') = =<span style="font-size: 80%; color: #000080; font-family: 'Courier New', Courier, monospace;">FROM d_events; = =<span style="font-size: 80%; color: #000080; font-family: 'Courier New', Courier, monospace;"> = =<span style="font-size: 80%; color: #000080; font-family: 'Courier New', Courier, monospace;">__<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;">TO_CHAR(EVENT_DATE, 'fmMonthdd, YYYY') __ = =<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;">May14, 2004 = =<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;">April28, 2004 = =<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;"> = =<span style="font-size: 80%; color: #000080; font-family: 'Courier New', Courier, monospace;"> = =<span style="font-size: 80%; color: #000080; font-family: Georgia, serif;"> = =<span style="font-size: 80%; color: #000080; font-family: 'Courier New', Courier, monospace;">FROM DUAL; SELECT TO_DATE('May10,1989','fxMonDD,RRRR') AS "Convert" FROM DUAL; = =<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;">__Convert__ = =<span style="font-size: 80%; color: #008000; font-family: 'Courier New', Courier, monospace;">10-MAY-89 =