would appreciate if you can delight me with some experience you had. what i need is to identify the same day in the previous year for current sysdate. i am not sure if you can provide a sample SQL or a name of Oracle function that perform this query.
thanks, Sundog. I thought of add_months but it does not return the same day. for example, today is Sep 27, 2007 (Thursday), the return of add_months(sysdate, -12) is Sep 27, 2006 (Wednesday). The correct result should be Sep 28, 2006 (Thursday).
The problem here was not with Sundog's solution, but the "specification" of the task. How do you define "same day"? Do you want to get the same day of the same week in the previous year (at least your answer suggests that)?
Sorry Bulent but that'll give the same dd/mm for the previous year, not the same day of the week as this year. An example of what he's going for is to calculate the first Monday in October for a given set of years.