How to select the date dynamically

I cant because it is restricted out side environment

Thanks @geetishree.rao ,
Thanks its worked.
For year and month I am trying but I am unable find that can you please explain a bit

Dear Naveen,
We can use the available functions/methods prop of date to get the desired day’s values.
What is your requirement?

Example:
Keep this in writeline and see the outpt

lets say todays date 08/10/2021

“Tomorrow:”+Now.AddDays(1.0).ToString(“dd/MM/yyyy”) +Environment.NewLine+“Yesterday:”+Now.AddDays(-1.0).ToString(“dd/MM/yyyy”)+Environment.NewLine+“NxtMonth:”+Now.AddMonths(1).ToString(“dd/MM/yyyy”)+
Environment.NewLine+“PrevMonth:”+Now.AddMonths(-1).ToString(“dd/MM/yyyy”)+
Environment.NewLine+“NxtYear:”+Now.AddYears(1).ToString(“dd/MM/yyyy”)+
Environment.NewLine+“PrevYear:”+Now.AddYears(-1).ToString(“dd/MM/yyyy”)

Actually the requirement is I need to login to a portal and download a zip file(which are excel files) on daily basis.
After that I need to do further things.

I think this condition will work even after changing the month since it will automatically change the month and year after current month and year right at that time based on your condition it will write the current date even after changing the month(because the month will change automatically).
So need to not perform any logic on month and year.
Right??

Yes,it generates based on present day dynamically
If this helps please mark it as the solution to help others

Thanks,
Geetishree Rao

Already marked.
Thanks for your help

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.