Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle error message
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