比如:2天3个小时20分钟 
(2*24*60)+(3*60) + 30 = 3090分钟 
如何根据3090分钟重新得到2天3个小时20分钟这个值?如题:
int timeSpan = 3090;
string re = string.Format("过期计时:{0}天{1}小时{2}分", ?, ?, ?);

解决方案 »

  1.   

    using System;class Prorgram
    {
      static void Main()
      {
        TimeSpan ts = new TimeSpan(0, 3090, 0);
        Console.WriteLine(ts);
      }
    }
      

  2.   

    using System;class Prorgram
    {
      static void Main()
      {
        TimeSpan ts = new TimeSpan(0, 3090, 0);
        Console.WriteLine(ts);
        string re = string.Format("过期计时:{0}天{1}小时{2}分", ts.Days, ts.Hours, ts.Minutes);
        Console.WriteLine(re);
      }
    }
      

  3.   

    int timeSpan = 3090;
    TimeSpan ts = new TimeSpan(0, timeSpan, 0);
    string re = string.Format("过期计时:{0}天{1}小时{2}分", ts.Days, ts.Hours, ts.Minutes);
      

  4.   

    TimeSpan   timeSpan   =   new   TimeSpan(0,3090,0);   
    Console.WriteLine(Convert.ToDateTime(timeSpan.ToString()).ToString("HH:MM:ss"));
    timeSpan.Days, timeSpan.Hours, timeSpan.Minutes