1
Answer

How to set Date Time format in 24 hours in c#?

Rohan Ramani

Rohan Ramani

5y
4.9k
1
Hello,
I have to set date time format in 24 hours.
  1. DateTime dtDeadline = (DateTime)currentResume.PositionDeadlineTime;  
  2. dateDeadLine = dtDeadline.ToString("dd MMM yyyy hh:mm:ss");  
This will give the results as "03 Dec 2019 01:30:00"  // 12 hours
But I need the results as "03 Dec 2019 13:30:00"   // 24 hours
Answers (1)