ORA-01830: date format picture ends before convert

oracle United States
  • 17 years ago

    Hi Folks,
    Being struggling with this error. Any idea whats wrong in this. It gives me this error ORA-01830 when i execute this query.


    Thanks,
    Insert into CONTRACTT (CONTRACTID,BEGINDATE,ENDDATE,MARKETSERVICE,SERVICETYPE,CONTRACTTYPE,LOCATIONID,BUYERID,SELLERID,INTERNALREFERENCEID,TERMINATIONDATE,CONFIRMATIONLEVEL,FIXEDAMOUNTFLAG,CONFIRMED,PENDINGREQUESTBY,PENDINGPROFILE,SUBMITDATE,LASTUPDATEDDATE,FIXEDAMOUNTPATTERN) Values (680,'01/01/2002 4:00:00 AM','02/01/2002 4:00:00 AM',21,'NA','EBM',506,8,50010,'EXTREF680','','C','N','Y','','N','12/30/2001 4:00:00 AM','01/01/2002 3:00:00 AM','')


    Thanks in advance
    Kumsi

  • 16 years ago

    Quote:
    [1]Posted by kumsi on 11 Feb 2004 10:40 AM[/1]
    Hi Folks,
    Being struggling with this error. Any idea whats wrong in this. It gives me this error ORA-01830 when i execute this query.


    Thanks,
    Insert into CONTRACTT (CONTRACTID,BEGINDATE,ENDDATE,MARKETSERVICE,SERVICETYPE,CONTRACTTYPE,LOCATIONID,BUYERID,SELLERID,INTERNALREFERENCEID,TERMINATIONDATE,CONFIRMATIONLEVEL,FIXEDAMOUNTFLAG,CONFIRMED,PENDINGREQUESTBY,PENDINGPROFILE,SUBMITDATE,LASTUPDATEDDATE,FIXEDAMOUNTPATTERN) Values (680,'01/01/2002 4:00:00 AM','02/01/2002 4:00:00 AM',21,'NA','EBM',506,8,50010,'EXTREF680','','C','N','Y','','N','12/30/2001 4:00:00 AM','01/01/2002 3:00:00 AM','')


    Thanks in advance
    Kumsi



    Kumsi,


    Oracle does not understand that dates that you are passing to it. All date strings should be passed to Oracle using the TO_DATE function. In the example you provide, you would use:


    TO_DATE('12/30/2001 4:00:00 AM, 'MM/DD/YYYY HH:MI:SS AM')


    to encode all date values.



    Hurg

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The difference between theory and practice is smaller in theory than in practice.”