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

Home -> Community -> Usenet -> c.d.o.tools -> Eror: ORA-01861 Literal Does Not Match Format String

Eror: ORA-01861 Literal Does Not Match Format String

From: Brian E. Parker <beparker_at_reply.in.the.group.plz>
Date: Wed, 2 May 2001 11:52:58 -0500
Message-ID: <QXWH6.85$c4.10457617@ounews.ou.edu>

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

Original text of this message

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