Answers for "xamarin 12 hrs time format tt"

C#
0

xamarin 12 hrs time format tt

public static class MyExtensionClass
{
    public static string ToFormat12h(this DateTime dt)
    {
        return dt.ToString("yyyy/MM/dd, hh:mm:ss tt");
    }

    public static string ToFormat24h(this DateTime dt)
    {
        return dt.ToString("yyyy/MM/dd, HH:mm:ss");
    }
}
Posted by: Guest on November-30-2020

Code answers related to "xamarin 12 hrs time format tt"

C# Answers by Framework

Browse Popular Code Answers by Language