Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
swati_rastogi27
Creator
Creator

Dynamic date range for calender

Hi ,

I have a calendar object , wherein , I have hard-coded:

min value as Num(Date#('01/01/2016', 'MM/DD/YYYY'))

max value as Num(today())

How can i make min value dynamic to always be 01/01/current year-1 , so in 2018 , it should be 01/01/2017

There is another requirement to have min value as : Num(Date#('01/01/2016', 'MM/DD/YYYY'))

max value as 12/31/current-year-2, so in 2018 , max value will be 12/31/2016

How can max value be made dynamic?

1 Reply
vinieme12
Champion III
Champion III

Min date for previous year

=YearStart(Addyears(today(),-1))

Max date for previous year

=YearEnd(Addyears(today(),-1))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.