How to convert time string into 24 hrs format

@smita.mobifly
buddy we need am or pm to get this in 24 hour format as 08:19 can be taken as both morning and night…but the compiler takes as morning

So try like this we will get the value, else you were doing great
Datetime.ParseExact(“16/05/2018 08:19 PM”,“dd/MM/yyyy hh:mm tt”,new system.Globalization.CultureInfo(“en-US”)).ToString(“yyyy-MM-dd HH:mm:ss”)

we will get answer like this

2018-05-16 20:19:00

Cheer buddy

3 Likes