Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Date and time field question
Matthew Tan <tankc_at_singnet.com.sg> a écrit dans le message : 8d3uh2$t7h$1_at_mawar.singnet.com.sg...
> Hello,
>
> I am having problem creating a time and date format,
>
> 1) v_timedate := to_char(sysdate,'DD-MON-YYYY HH24:MI:SS');
>
> I will encounter this error message :
>
> "date format picture ends before converting entire input string"
>
It seems to me type of v_timedate is date. If so, there is two conversions: first with to_char function and the second is implicit to convert the result of to_char to a date variable. If your nls_date_format is not 'DD-MON-YYYY HH24:MI:SS' then the second conversion fails.
>
>
> When I change to
>
> 2) v_timedate := to_char(sysdate,'DD-MON-YYYY');
>
> It will work fine BUT it will display :
>
> 13-APR-00
>
> What happen to the '20' ?
>
>
> Thanks for any help !
>
-- Have a nice day MichelReceived on Thu Apr 13 2000 - 00:00:00 CDT