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

Home -> Community -> Usenet -> c.d.o.misc -> Help required with to_date function

Help required with to_date function

From: Nagesh <nageshhatti_at_yahoo.com>
Date: 12 Jan 2004 21:37:51 -0800
Message-ID: <d6bb3c3d.0401122137.651494ab@posting.google.com>


I have a column in the database called "DELIVERY_DATE",it is of type varchar2. The value of the date(in the string format)is stored as "10Jun2002 15:12:30 GMT" (double quotes not included) Now in a query I need to use this column in a order by clause.I cannot use the standard date patterns in the to_date function.So I decided to truncate the GMT part of it. Now it works fine, but what makes this a little more complicated is that some vaules will not have this delivery date value and hence i get this exception:
Start server side stack trace:

java.sql.SQLException: ORA-01847: day of month must be between 1 and last day of month

        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
        at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
        at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
       ..............

How do i solve this.

The DB is oracle 8.1.7

All help is appreciated.
Thank You

Nagesh Received on Mon Jan 12 2004 - 23:37:51 CST

Original text of this message

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