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

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01843: not a valid month

Re: ORA-01843: not a valid month

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 15 Dec 2005 13:03:50 -0800
Message-ID: <1134680623.704522@jetspin.drizzle.com>


Shailesh wrote:

> On startup our Application always sets date format to dd.mm.yyyy format
> using
> ALTER SESSION SET NLS_DATE_FORMAT = 'DD.MM.YYYY';
>
> But error occurs on following statement.
> SELECT Type, Module FROM TableTypeModule
> WHERE NVL(TRUNC(BeginDate), '01.01.1800') <= TRUNC(SYSDATE)
> AND TRUNC(EndDate) >= TRUNC(SYSDATE);

BeginDate, I presume is of the DATE data type. '01.01.1800' is a string ... not a date. Try TO_DATE().

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Thu Dec 15 2005 - 15:03:50 CST

Original text of this message

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