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 statement

Re: to_char statement

From: Nick Taylor <ntwysiwyg_at_dataskill.co.uk>
Date: Tue, 21 Aug 2001 11:39:58 GMT
Message-ID: <3B82488C.BA195B4F@dataskill.co.uk>


Thomas Kyte wrote:
>
> In article <3B8125D8.DDC9A930_at_dataskill.co.uk>, Nick says...
> >
> >Hi
> >
> >This looks like a problem to me unless I'm missing something.
> >
> >In SQLPlus I'm trying the following:
> >
> >SQL> select to_char(sysdate,'ddTH fmMonth YYYY HH24:MI:SS') from dual;
> >
> >TO_CHAR(SYSDATE,'DDTHFMMONTH
> >----------------------------
> >20th August 2001 15:47:4
> >
> >SQL>
> >
> >The seconds lose the leading 0
>
> You can put FM in there more then once to toggle it on and off, perhaps what you
> want is:
>
> SQL> select to_char(sysdate,'fmddTH Month YYYY fmHH24:MI:SS') from dual
> 2 /
>
> TO_CHAR(SYSDATE,'FMDDTHMONTH
> ----------------------------
> 20th August 2001 14:13:02
>

It sure is. It was completely unclear in "Oracle 8i - The Complete Reference" however I agree that the SQL docs do imply that it applies to all subsequent elements. I'm not sure that I would have guessed that it was a toggle though.

Thanks

Nick

-- 
Nick Taylor
Say No to Spammers - What You See Isn't What You Get to Email Me
Received on Tue Aug 21 2001 - 06:39:58 CDT

Original text of this message

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