hi ,
today date is 10/07/2020 and i need to get last 2nd date:
ex: today date - 10/07/2020
target - 2
result : 1)today date - 2 days = 8/07/2020
2) today date - 3 days= 7/07/2020
please help me for this output
You can try as below
- DateTime.Now.AddDays(-2).ToString(“dd/MM/yyyy”)
- DateTime.Now.AddDays(-3).ToString(“dd/MM/yyyy”)
Mark as solution if this helps
Thanks
1 Like
Try this
DateTime.Now.AddDays(-theDayCountYouWantToSubtract).ToString(“dd/MM/yyyy”)
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.