Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Eror: ORA-01861 Literal Does Not Match Format String
Hello,
I'm trying to query an Oracle database from ColdFusion using SQL. I can do:
select * from my_table;
One of the fields is pd_date, which is of type date ( at least this is what s-designer tells me the datatype of that field is ). If I look at what is stored in pd_date, it is in this format:
yyyy-mm-dd hh:mm:ss (example: 1999-04-13 22:18:05 )
But, I can't do a query using a where clause on the pd_date field without getting the following error:
ORA-01861 Literal Does Not Match Format String
I've tried everything I can think of. Single-quotes, double-quotes, changing the format around, not specifying the time fields, using / instead of -, etc. No matter what I do, assuming it's a legal SQL statement, I get that same error back.
If you have any idea what the problem is, please let me know.
This is an example of what I am trying:
select * from my_table where pd_date < '1999-04-13 22:18:05';
TIA,
-BEP
Received on Wed May 02 2001 - 11:52:58 CDT