Yes, you are absolutely correct. I was thinking that the datefield was in fact a

date (rather than a character representation).  I didn't see the whole message.

Thanks for correcting me.

Mark E Novak wrote:

> To insert formatted dates into an Oracle date field, in this instance, you
> would use to_date(dtfield, 'DD,MM,YYY'). I've used this successfully.
>
> You would use Oracle's to_char() to format a selected date field from Oracle
> as Oracle gives it to you in its default format, 01/MAY, 1999.
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Gael
> Stevens
> Sent: Tuesday, October 26, 1999 10:40 AM
> To: [EMAIL PROTECTED]
> Subject: Re: DATE PROBLEM
>
> No, you used to_date().  you need to use to_char().  Oracle doesn't do
> to_date conversion on a date column, although the error message could be
> more helpful.
>
> RAHIMUNISA_N wrote:
>
> > that is what i did
> >  i used to_date(dtfield,'dd/mm/yyyy') but no use.
> >  i got error "not a valid month".
> >
> > -----Original Message-----
> > From: Mark E Novak [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 26, 1999 6:25 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: DATE PROBLEM
> >
> > The date, 01/MAY/1999 was accepted as this is Oracle's default date
> > format.
> > You have the right idea using to_date; however, try this instead:
> > to_date(datefied,'DD/MM/YYYY').
> >
> > Also note when you get the date out of Oracle, it will be presented in
> > Oracle default date format, ie. 01/MAY/1999. You will need to use
> > to_char if
> > you want a different format coming out of Oracle.
> >
> > Hope this helps.
> >
> > Mark
> >
> > -----Original Message-----
> > From: A mailing list for discussion about Sun Microsystem's Java Servlet
> > API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> > RAHIMUNISA_N
> > Sent: Tuesday, October 26, 1999 3:15 AM
> > To: [EMAIL PROTECTED]
> > Subject: DATE PROBLEM
> >
> > hi,
> >    i have a date field which uses format dd/mm/yyyy.
> > if user enters 01/01/1999 and presses the submit button .the data is
> > entered in database table thru a procedure . i get
> > a sql exception stating 'ora-01843:not a valid month'
> >
> > if i enter a format like 01/MAY/1999 the data is entered in the table.
> > what's the reason for this error ?
> >
> > while inserting data in the procedure iam using
> > procedure abc (.... , datefied in varchar2,....)
> > ...
> > begin
> >     insert into tabl values(
> >     .......,
> >     to_date(datefied,'dd/mm/yyyy'),
> >     ........);
> > end;
> >
> > if some one has faced this problem pls help me in solving it.
> > thanks,
> > ruks.
> >
> > ________________________________________________________________________
> > ___
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> > ________________________________________________________________________
> > ___
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> >
> ___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
begin:vcard
n:;Gael
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Gael Stevens
end:vcard

Reply via email to