www.oradev.com
  Database   Sql   Functions   Packages   Performance   Books   Oracle   Other   About   XML   ORA-messages
  to_date

Functions

Oracle (var)char functions
Instr function
Number format
Kill oracle session
to_date function
Oracle sysdate
Oracle substr
How to use the DECODE statement
How to use the CASE statement
How to use the NVL statement
Using XML functions
Oracle date format
Oracle numeric functions
Oracle date functions
Pl sql trim


  OraDev.com

Oracle to_date function

The oracle to_date function converts a string in a specified format to an Oracle date format.

Syntax

to_date('formatted string'); (returns a date using the default oracle date format)
to_date('formatted string','format string'); (returns a date using the format string specified)
to_date('formatted string','format string','nls description');(returns a date using the format string specified and using the specified NLS settings)

Example:

to_date('01-JAN-2006');
to_date('01-01-2004','DD-MM-YYYY');
to_date('31-12-2006 23:34:59','DD-MM-YYYY HH24:MI:SS');
to_date('01-JAN-99''DD-MON-YY,'nls_date_language = American');

A list of all the format-strings you can use is listed here