Home » SQL & PL/SQL » SQL & PL/SQL » Re: Calculate days between dates.
Re: Calculate days between dates. [message #20202] Mon, 06 May 2002 12:20
Parag dave
Messages: 8
Registered: February 2002
Junior Member
Hi,
In my report, The user types the date as a prompt
(&&1) and the due_date is from the table and stored
as 'DD-MON-YY'
So here I am trying to convert character to date
and then substract date from date and then convert to number.
My query works just fine except some customers who have due date '02-NOV-00' Here I get the error ORA-01841.
Any work around? Please help! My query is as follows
SELECT
to_number(to_date(to_date('&&1','DD-MON-YYYY'),'DD-MON-YYYY') -
to_date(due_date,'DD-MON-YYYY')) days
FROM TABLExxx
/
The user types 30-APR-2002' as a prompt.
Previous Topic: Oracle9i personal edition download
Next Topic: string O numbers in IN??
Goto Forum:
  


Current Time: Wed Apr 24 12:38:31 CDT 2024