| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Date and time field question
In article <8d3uh2$t7h$1_at_mawar.singnet.com.sg>,
"Matthew Tan" <tankc_at_singnet.com.sg> wrote:
> 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"
>
How is v_timedate defined? As is it must be a char or varchar2 column
with a length of at least 20.
> When I change to
>
> 2) v_timedate := to_char(sysdate,'DD-MON-YYYY');
>
> It will work fine BUT it will display :
>
> 13-APR-00
>
How are you displaying the date? The normal Oracle default display
date format is dd-Mon-yy which is what you are showing.
> What happen to the '20' ?
>
> Thanks for any help !
>
Observe:
UT1> l
1 declare
2 v_date1 varchar2(20) ; 3 v_date2 date ;
UT1> @temp
v_date1 is 13-apr-2000 12:49:00
v_date2 is 13-apr-2000 12:49:00
PL/SQL procedure successfully completed.
-- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice -- Sent via Deja.com http://www.deja.com/ Before you buy.Received on Thu Apr 13 2000 - 00:00:00 CDT
![]() |
![]() |