Use system.datetime.now to get todays date time and accordingly perform the operation by using .AddDays(- int x) to get x days before today.
Hope i helped you.
I use DateTime.AddDays(-1).ToString(“dd-MM-yyyy”) , but it doesn’t work since you don’t select the date or dates
firstly you have to save todays date in date time variable using datetime.now then on that variable you have to perform add days operation
Pass the now.tostring.adddays(-1). ToString in the selector where idx shown as number
Use webctrl aaname=‘“+DayTime.AddDays(-1).ToString(“dd-MM-yyyy”)+”’