1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
@functions { //TimeSpan 비행시간 구하기 public string sTimeSpan(DateTime DateTime1, DateTime DateTime2) { string result = ""; TimeSpan timeCal = DateTime1 - DateTime2; result = (timeCal.Hours).ToString("0") + "시간 " + String.Format("{0:00}", Math.Abs(timeCal.Minutes)) + "분"; //TimeSpan을 24시간 기준의 string\ return result; } } |