Answers for "c# format float to minutes seconds"

C#
2

format float to time c#

using System;

class Test
{
    static void Main()
    {
        float totalSeconds = 228.10803f;
        TimeSpan time = TimeSpan.FromSeconds(totalSeconds);
        Console.WriteLine(time.ToString("hh':'mm':'ss")); // 00:03:48
    }
}
Posted by: Guest on March-16-2020

Code answers related to "c# format float to minutes seconds"

C# Answers by Framework

Browse Popular Code Answers by Language