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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: ora-01841

RE: ora-01841

From: Diana Duncan <Diana_at_fileFRENZY.com>
Date: Fri, 29 Dec 2000 15:33:30 -0500
Message-Id: <10725.125472@fatcity.com>


For one thing, you don't need to to_char() the dates at all. You can just do:

     if (date1 = date2) then
If you don't want to compare time information, then

     if (trunc(date1) = trunc(date2)) then

Anyway, it looks as if you have bad data, where one of your dates is 0000 instead of 2000.

Diana

-----Original Message-----
From: grace lim
To: Multiple recipients of list ORACLE-L Sent: 12/29/00 12:00 AM
Subject: ora-01841

gurus,

i need ur help.... i have a forms that compare 2 dates . when i run it as
client server, no error occur but when i transferred it to my nt web server application and run it from the web browser, an error occur

ora-01841:full year must be between -4713 and +9999 and not be 0.

here's a sample code
  if to_char(date1,'MMDDYYYY') = to_char(date2,'MMDDYYYY') then

     do some actions
  end if;

is there something wrong w/ the stmt? what do i have to do?

thanks ! and HAPPY NEW YEAR TO ALL OF U    

Grace Lim
Suy Sing Comm'l Corp.
247-41-34
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: grace lim
  INET: mglim_at_softhome.net

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Dec 29 2000 - 14:33:30 CST

Original text of this message

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