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 C. Stock <mcstockX_at_Xenquery>
Date: Thu, 23 Feb 2006 11:12:56 -0500
Message-ID: <W6edncEDZu6XQmDeRVn-vA@comcast.com>


:
: "Martin Doherty" <martin.doherty_at_undisclosed.com> wrote in message
news:7YkLf.30$AP2.42_at_news.oracle.com...
: Randy Harris wrote:
:
: : "Liz J" <thejordanschangethistoanatsignclara.net> wrote in message
: : news:1140653404.29042.0_at_damia.uk.clara.net...
: :
: : How about:
: :
: : To_char ('03-Feb-2006', 'ddth Month YYYY')
: :
:
: That might work, but it relies on an implicit type conversion of the
literal string '03-Feb-2006' into a valid date, and assumes
: that the default NLS_DATE_FORMAT string is set to 'dd-mon-yyyy'.
:
: A safer method would be
: to_char(to_date('03-Feb-2006', 'dd-mon-yyyy'), 'ddth Month YYYY')
:

better yet:

to_char(date '2006-02-03', 'ddth Month YYYY')

++ mcs Received on Thu Feb 23 2006 - 10:12:56 CST

Original text of this message

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