Formatted Time From Minutes - CSharp System

CSharp examples for System:DateTime Minute

Description

Formatted Time From Minutes

Demo Code


using System.Web;
using System.Linq;
using System.Collections.Generic;
using System;/*from   w w w.  j a v  a 2 s.c om*/

public class Main{
        public static string FormattedTimeFromMinutes(int minutes)
        {
            string result = string.Empty;

            TimeSpan time = TimeSpan.FromMinutes((double)minutes);
            result = string.Format("{0:00}:{1:00}", time.Hours, time.Minutes);
            return result;
        }
}

Related Tutorials