Re: Oracle date format

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Fri, 05 Nov 2004 19:55:23 +0100
Message-ID: <cmdu0m$mkb$1_at_news1.zwoll1.ov.home.nl>


Bill Li wrote:
> Hi all,
> I am trying to insert date/time value into a column with datatype date.
> During this insertion, I cannot use to_date or any other Oracle functions.
>
> When I use the string, '01-jan-2004', the value is inserted okay. However,
> when I included the time, e.g. '01-jan-2004 01:01:01', I get the error
> ORA-01830 (date format picture ends before converting entire input string).
>
> Does anyone know what is the native string value I can use to when insert
> into a date datatype?
>
> Thanks,
> Bill
>
>

Dates aren't dates, they're numbers, actually. (Time since 4731 BC, or something like that...).
How do you get a number to display as '01-jan-2004'? One applies a so-called format mask. Same number could be displayed as '01/01/2004', or even '01-jan-2004 01:01:01'. Ehm, cheating by not mentioning rounding here...

-- 

Regards,
Frank van Bortel
Received on Fri Nov 05 2004 - 19:55:23 CET

Original text of this message