时间类型转换成其它格式
string filename = DateTime.Now.ToString("yyyyMMddHHmmss")
时间类型转换成HH:mm
DateTime dt = new DateTime();dt = DateTime.Parse(data.Tables[0].Rows[j][4].ToString()); tempSheet.Cells[j + 2, 5] = dt.ToString("HH:mm");
数值秒转换成HH:mm
int seconds = int.Parse(data.Tables[0].Rows[j][5].ToString());string time = string.Format("{00:00}:{01:00}", seconds / 3600, seconds % 3600 / 60);