[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] Oracle Date Arithmetic
- Subject: [sqr-users] Oracle Date Arithmetic
- From: "Turner, Ivan" <Ivan.Turner@qwest.com>
- Date: Thu, 22 Jan 2004 12:26:20 -0600
- List-id: This list is for discussion about the SQR database reporting language from Hyperion. <sqr-users.sqrug.org>
- Thread-index: AcPhFTt06M9Lt13SQHKJb47ava1qQw==
- Thread-topic: Oracle Date Arithmetic
I need to subtract 100 yrs from some dates.
JD363258 14-FEB-2097
needs to be 14-FEB-1997
If I do an oracle query I get a March date in the correct year. I know
this is due to leap year so I need to add a day for every day that's a
leap year.
Is there a quick and easy way to do this?
select to_char(since_dt - 36500,dd-mon-yyyy')
from ps_customer
where cust_id = JD363258;
SQL> /
TO_CHAR(SIN
-----------
11-mar-1997
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users