Hello,
I am having a string which is having time like “7:00 PM”. I need to convert this in 24 hrs format. I tried below thing.
Datetime.ParseExact(startTime,“hh:mm tt”,new system.Globalization.CultureInfo(“en-US”)).ToString(“HH:mm”) getting below error.
Error - Assign: String was not recognized as a valid DateTime.
How to resolve this.