Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle error message

Re: Oracle error message

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Wed, 14 Nov 2001 17:25:31 GMT
Message-ID: <fOxI7.26163$XJ4.16121515@news1.sttln1.wa.home.com>


I think you want
to_char(Schema.Table.Field,'YYYY')

I am assuming that you are doing:

select to_char(Schema.Table.Field,'YYYY') from schema.table where... If you are doing
insert into ... then that won't work because Oracle needs to know the month and day of the date.
Jim

"Allen Legg" <alegg_at_nortelnetworks.com> wrote in message news:3bf2a247.1130419817_at_news.europe.nortel.com...
> Hi,
>
> I am trying to format the value of a DATE datatype field.
> My code is
>
> to_date(Schema.Table.Field,'YYYY')
>
> This is the error I receive.
> ORA-01830: date format picture ends before converting entire input
> string :-1830
>
> The typical format of values in that field is:
> 2001/7/4 13:25:51
>
> Any ideas on what the problem might be?
> Thanks,
>
> Allen
Received on Wed Nov 14 2001 - 11:25:31 CST

Original text of this message

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