Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: to_char syntax

Re: to_char syntax

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 22 Feb 2006 18:02:12 -0800
Message-ID: <1140659997.099275.205260@g43g2000cwa.googlegroups.com>


To convert a character representation to a date you use the to_date function:

to_date('03-Feb-2006','DD-Mon-YYYY')

If you have a character representation of a date and you want to reformat it but keep it in character format you can either use the provide character manipulation functions like instr, substr, lenght, replace, and transform or you can convert the data to a date with to_date and enclose the to_date in a to_char to convert the data back to character representation.

Normally you to_date the data into the database one time and use to_char to display the data as desired.

All functions mentioned in my reply are described in the SQL manual chapter on single row functions.

HTH -- Mark D Powell -- Received on Wed Feb 22 2006 - 20:02:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US