Input_DATE (-2)

Hi team ,
I have given date in my config file now i want to make statement that can read config input date and give out put 2 days back date like if i write 03.02.2021 then it give us output as 01.02.2021

HI @Kuldeep_Pandey

Checkout this expression

Datetime.ParseExact(InputString,{"dd.MM.yyyy","MM/dd/yyyy hh:mm:ss"},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).Adddays(-2).Tostring("dd.MM.yyyy")

Regards
Sudharsan

Hi @Kuldeep_Pandey
Refer below link for all datetime conversions
All about Datetime - UiPath - News / Tutorials - UiPath Community Forum

Datetime.ParseExact(YourDateinput,"dd.MM.yyyy"},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).Adddays(-2).Tostring("dd.MM.yyyy")

Regards,
Arivu


Showing error

try below one @Kuldeep_Pandey
Datetime.ParseExact(YourDateinput,"dd.MM.yyyy",System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).Adddays(-2).Tostring("dd.MM.yyyy")

Regards,
Arivu

2 Likes

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