Getting the Day Minus one

Hi All,

I want to get a date 16/sep/2021 in the format 20210916 after this I want subtract a day -1
I.e I want the final output as 20210915.
Someone help me on this please.


Hope this expression would help you resolve this

If the input is in a string variable named str_input

Then in a assign activity

str_output = Datetime.ParseExact(str_input.ToString,”dd/MMM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).AddDays(-1).ToString(“yyyyMMdd”)

This will give the day -1 as you expect

Cheers @HeartCatcher


Hi @Palaniyappan,
Thanks Very much its worked fine.

1 Like

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