Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c sharp convert string time into 24 hours time

using System;

class Solution
{
    static string timeConversion(string s)
    {
        return DateTime.Parse(s).ToString("HH:mm");
    }

    static void Main(string[] args)
    {
        Console.WriteLine(timeConversion("01:00 PM"));
        Console.Read();
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sharp #convert #string #time #hours #time
ADD COMMENT
Topic
Name
9+4 =