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: DAte conversion

Re: DAte conversion

From: Damien Salvador <damien.salvador_at_via.ecp.fr>
Date: 29 Nov 2001 00:09:52 GMT
Message-ID: <slrna0av6e.i4b.damien.salvador@zen.via.ecp.fr>


On Wed, 28 Nov 2001 18:47:31 +0100, longinus <longinus_at_zeus.polsl.gliwice.pl> a écrit:
>
>Andy schrieb:
>> On Wed, 28 Nov 2001 00:40:27 +0100, longinus
>> <longinus_at_zeus.polsl.gliwice.pl> wrote:
>> create table testtable(f_datefield date);

>> insert into testtable(f_datefield)
>> values (to_date('01.01.2001','DD.MM.YYYY');

>> commit;
>> select to_char(f_datefield,'DD-MON-YYYY') foo from testtable;

>> foo
>> ------------------
>> 01-JAN-2001

>It looks ok, but what if I want to display the month as a number
>according to the format i wrote?

It is not connected. You did not "write in a specific format". Oracle converted your string into a number, and stored that number.

this number in turn can be converted into whatever you may want (or almost :-) )

just do select to_char(f_datefiled,'DD-MM-YYYY') bla bla ...

Note : could you also respond after your posts, it gets confusing after a few exchanges.

-- 
Damien
Received on Wed Nov 28 2001 - 18:09:52 CST

Original text of this message

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