Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: to_char syntax
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