Categories
- All Categories
- 127 Oracle Analytics News
- 23 Oracle Analytics Videos
- 14.5K Oracle Analytics Forums
- 5.5K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 47 Oracle Analytics Trainings
- 7 Oracle Analytics Data Visualizations Challenge
- 4 Oracle Analytics Career
- 8 Oracle Analytics Industry
- Find Partners
- For Partners
Timestampadd-Previousyear+Static date/Month

Hi All, Ia m trying to add a filter to my report analysis date column. Date>='2019-07-01' and date <='2019=09-25'. Year should be calculated based on sysdate, I mean it should be sysdate-1. 07-01 & 09-25 are Static Values. Thank you, Raj
Answers
-
Hi,
You are trying to add that filter, fine.
And what did you try? What was the issue?
Not sure Timestampadd is what you look for, it isn't really made for "fixed" dates logic but for logic based on a relative delta from a given date.
In your case you can use the function to get the year from the current date (which is another function), do a -1 as it will be a number and you can do mathematical operations on it, cast it to a string and concatenate with the month-day fixed parts and cast to a date.
The issue with timestampadd is that you would need to do all the logic to from the current date to your fixed dates, and it will not be any easier than the above logic.
Try the formula in an analysis as formula in a column, you will have all the list of available functions by type in the window making it really easy to find and try.
0 -
I tried this.Below is the solution which worked for me.Thank you. CAST('25-JUL-'||CAST (YEAR (CURRENT_DATE)-1 AS CHAR) AS DATE)
0