RATE THIS ANSWER
0
Click to Vote:
0
0
You say "query" so I assume you are using SQL ...
All flavors of SQL have all kinds of date related functions and functionality.
look up the functions and try something like this (this is big DB2 syntax):
SELECT MONTH(date_col - 3 MONTHS) , YEAR(date_col - 3 MONTHS)
-------------------
or if you mean query/400
WRKDATE CURRENT(DATE) - 3 month
MONTH month(CURRENT(DATE) - 3 month)
YEAR year(CURRENT(DATE) - 3 month)
Here month would be a 2 digit number, like 04
and year would be a 4 digit number, like 2009
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/q400/rbaf9mst75.htm
Phil
Last Answered:
Oct 5 2009 8:16 PM GMT by Philpl1jb 
24600 pts.