String was not recognize valid date time


I have written above syntex for str_ETADate - str_MapTransitTime = 18/12/2022-5days = 13/12/2022 is require output. Both values are converted into string.
but not getting.

Please help on this

Hi @satish.rathi59 ,

Could you Check with the below Expression :


As @supermanPunch suggested, using DateTime.ParseExact would be the Go-To solution to convert strings to date, and then work with DateTime functions. CDate, Convert.ToDateTime, DateTime.Parse tend to fail with certain type of dates.

DateTime.ParseExact lets you write the exact format (in this case it would be “dd/MM/yyyy”, but also an array of possible formats :slight_smile:

Hope this helps!


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