www.oradev.com   for Oracle developers
  Pl/sql articles   Oracle articles   Performance   scripts   Books   Documentation   Links   XML
  Articles
Oracle numeric functions
Number format
Sequence
dbms_lob
dbms_output
Oracle substr
Using a ref cursor
How to use the CASE statement
How to use the DECODE statement
How to use the NVL statement
Oracle training
Oracle certification
Create statistics
dbms_profiler explained
How to use hints
Autonomous transaction
Oracle date format
Oracle sysdate
Rename tables, columns
to_date function
Scheduling in 10g
How to use utl_http




  to_date

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