比如:2天3个小时20分钟
(2*24*60)+(3*60) + 30 = 3090分钟
如何根据3090分钟重新得到2天3个小时20分钟这个值?如题:
int timeSpan = 3090;
string re = string.Format("过期计时:{0}天{1}小时{2}分", ?, ?, ?);
(2*24*60)+(3*60) + 30 = 3090分钟
如何根据3090分钟重新得到2天3个小时20分钟这个值?如题:
int timeSpan = 3090;
string re = string.Format("过期计时:{0}天{1}小时{2}分", ?, ?, ?);
{
static void Main()
{
TimeSpan ts = new TimeSpan(0, 3090, 0);
Console.WriteLine(ts);
}
}
{
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);
}
}
TimeSpan ts = new TimeSpan(0, timeSpan, 0);
string re = string.Format("过期计时:{0}天{1}小时{2}分", ts.Days, ts.Hours, ts.Minutes);
Console.WriteLine(Convert.ToDateTime(timeSpan.ToString()).ToString("HH:MM:ss"));
timeSpan.Days, timeSpan.Hours, timeSpan.Minutes