Get date from site and add one day

Hi, I want to get data from URL (which is stored in format dd-MMM-yyyy [for example 1-Jan-2022]) and add one day.
I have tried to get date from site using “Get Text” activity (which is later stored as string), and create new variable with System.DateTime type and convert it using “DateOnly.ParseExact(aDate, “dd-MM-yyyy”, system.Globalization.CultureInfo.InvariantCulture).AddDays(+1).ToString” expression, but I keep getting error:

image

Any ideas how can I solve it?

Hi @Grzegorz_Biernacki_PL

Try with this expression

DateTime.ParseExact(StringInput.ToString,"dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture).AddDays(+1).ToString("dd-MM-yyyy")

Regards
Gokul

image

Hi @Grzegorz_Biernacki_PL

Please use the following in your assign

DateTime.ParseExact(aDate, “dd-MM-yyyy”, system.Globalization.CultureInfo.InvariantCulture).AddDays(1).ToString(“dd-MM-yyyy”)

cheers