正整数转化为时间

private string FormatTime(int time)
{
  int hour = 0, min = 0, sec = 0;
  hour = time/60/60;
  min = (time%(60*60))/60;
  sec = (time%(60*60))%60%60;
  return string.Format("{0:00}:{1:00}:{2:00}", hour, min, sec);
}

 

posted @ 2013-05-06 10:45  Marble  阅读(382)  评论(0编辑  收藏  举报