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.
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