Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DAte conversion
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.
-- DamienReceived on Wed Nov 28 2001 - 18:09:52 CST
![]() |
![]() |