Config file Error1

Hi team
I have written date in my config file 01.03.2023 00:00:00 UiPath reading this date from config
Now I have given that it will take (-2)dateof config file like 27.02.2023
But its taking 01.01.2023
Kindly help

HI @Kuldeep_Pandey

Check with this expression

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

Regards
Sudharsan

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