Categories
- All Categories
- Oracle Analytics Learning Hub
- 31 Oracle Analytics Sharing Center
- 21 Oracle Analytics Lounge
- 251 Oracle Analytics News
- 45 Oracle Analytics Videos
- 16.1K Oracle Analytics Forums
- 6.3K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 93 Oracle Analytics Trainings
- 16 Oracle Analytics and AI Challenge
- Find Partners
- For Partners
How to use current date in a parameter
Hello,
I am building some workbooks using OAC and OAS. I understand I can use system parameters as current date but how can I create a user defined parameter that is current date-3 (3 days ago) for example. I know I can easily create a calc to return current date and or current date -3 but instead of using calc as the filter I wanted to pass the parameter in my filter control and default the dates to what I wanted. For current date it's not a problem but I don't know how to do the same for current date 3 days ago.
ultimately, I want to be able to bind those parameters to my data set columns so the initial value gets populated correctly.
Thanks
Syed
Answers
-
Hi Syed, Thanks for posting your question.
You can create a new date parameter that defaults to the current date minus three days, set the Initial Value to the Logical SQL query, something like below:
SELECT TIMESTAMPADD(SQL_TSI_DAY, -3, CURRENT_DATE) FROM "Subject Area"
you can then use this parameter the way you want in your workbook, this would return date minus three days.
Hope this helps!
1
