I need to minus the number of days from a date
Eg: x=7(number of days)
Date: 28-09-22
I need to get that in date format again
Can someone help me with this
Thanks
I need to minus the number of days from a date
Eg: x=7(number of days)
Date: 28-09-22
I need to get that in date format again
Can someone help me with this
Thanks
Hi @shilpa_p
Please Try This
YourDateTimeVariable.AddDays(-7).Tostring(“dd-MM-yy”)
Thank you so much :). I shall try this
Yes Try this one
OR
If your variable is StringType then
DateTime.ParseExact(StringVariable,“dd-MM-yy”,System.Globalization.CultureInfo.InvariantCulture).AddDays(-7).ToString(“dd-MM-yy”)
Hello @shilpa_p
Try with this one
DateTime.ParseExact(YourString,"dd-MM-yy",System.Globalization.CultureInfo.InvariantCulture).AddDays(-7).ToString("dd-MM-yy")
Hello @shilpa_p
If you want to go with UiPath default activities instead of a line expression, you can use Modify Date activity.
How to Modify Date in UiPath? Modify Date activity explained with demo
Thanks
Thanks everyone for the response . I will try all these