How to convert time string into 24 hrs format

@smita.mobifly

Nothing to change. Already its printing 24 HR format only.

If you want to test it then try below:

This is my string: “16/05/2018 20:19”

Datetime.parseexact(str,“dd/MM/yyyy HH:mm”,system.globalization.cultureinfo.invariantculture).tostring(“dd-MM-yyyy hh:mm")

here, HH - 24 Hr format
hh - 12 Hr format