C# 获取时间差(天数)
2021-05-19 02:28
标签:oda star public int ati return diff string 获取 public static int DateDiff(DateTime dateStart, DateTime dateEnd) C# 获取时间差(天数) 标签:oda star public int ati return diff string 获取 原文地址:https://www.cnblogs.com/zx724792526/p/11724001.html
{
DateTime start = Convert.ToDateTime(dateStart.ToShortDateString());
DateTime end = Convert.ToDateTime(dateEnd.ToShortDateString());
TimeSpan sp = end.Subtract(start);
return sp.Days;
}
上一篇:C# 事件