Reputation: 21
In my report I currently have a prompt box that displays a list of the current year's months in YYYYMM format: 201201 201202 201203...etc
However, I currently have it hardcoded to show between 201201 and 201212. This works fine but I would like to remove the hardcoding for 2012 and use the system date to determine what the current months should be. That way, in January, I won't have to go back and change every instance of 2012 to 2013.
What would be the best way to accomplish this? I understand to_char(current_date,'YYYYMM') but do not know how to successfully create a filter that would change over in January to display 201301-201312.
Thanks
Upvotes: 0
Views: 2637
Reputation: 21
I figured it out:
[Month YYYYMM] between to_char(current_date, 'YYYY')+'00' and to_char(current_date, 'YYYY')+'13'
Hope this helps someone, lostintern
Upvotes: 1