Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> data comparision in Oracle
I need to compare a column whose format is like '2003-08-11 18:35:43.0' with the sysdate and select all the records whose date is one day ahead of the sysdate. My query is like this:
select * from tableA where to_date(substr(errinfo$datetime, 1, 19),'dd-mm-yyyy hh24:mi:ss') - sysdate)<0
I get an error when running this query:
"The following error has occurred:
ORA-01861: literal does not match format string"
Can anyone tell me what is wrong with my query and how to compare the date with the sysdate? Thanks!
Abby
-- Posted via http://dbforums.comReceived on Mon Aug 11 2003 - 17:34:01 CDT
![]() |
![]() |