Retry logic for current date,-1 and +1 dates

Hello Community,

I got an process which will be host terminal.

I need to check the data in host using input date from user.

Requirement : as per user input date we need to check in host terminal before -1 date and current date and +1 date for each input.

can you please suggest the condition of logic so it need to retry with the three dates. if date 1 not there it need to search for 2nd date.

Ex : 2022-10-25 user need to check so now logic need to check before the user input date and after the user input date also 2022-10-24,2022-10-25,2022-10-26

Fno Business date acc number
12458 2022-10-25 3433945


To check -1 date Datetime.parseexact(yourdatestring, “yyyy-mm-dd”, system.globalization.cultureinfo.invariantculture).Adddays(-1)

To check +1 date
Datetime.parseexact(yourdatestring, “yyyy-mm-dd”, system.globalization.cultureinfo.invariantculture).Adddays(1)

hi Keerthi,

can you make the flow xaml for the above logic.


Hi @chaitanyaKumar

Check out the Date formats

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

Check out the XAML file

DateFormat.xaml (5.1 KB)




1 Like

Hi @chaitanyaKumar

If your issue is solved can you please mark the post as solved. It will helps other user too.


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