Answers for "string to 24 hour format c#"

C#
0

c sharp convert string time into 24 hours time

using System;
namespace Demo {
   public class Program {
      public static void Main(string[] args) {
         DateTime d = DateTime.Parse("05:00 PM");
         Console.WriteLine(d.ToString("HH:mm"));
      }
   }
}
Posted by: Guest on August-20-2021

Code answers related to "string to 24 hour format c#"

C# Answers by Framework

Browse Popular Code Answers by Language