C#计算两个日期的天数
2021-01-19 16:14
标签:rac splay return ret sub span turn none star C#计算两个日期的天数 标签:rac splay return ret sub span turn none star 原文地址:https://www.cnblogs.com/jiangqw/p/12154219.htmlprivate int DateDiff(DateTime dateStart, DateTime dateEnd)
{
DateTime start = Convert.ToDateTime(dateStart.ToShortDateString());
DateTime end = Convert.ToDateTime(dateEnd.ToShortDateString());
TimeSpan sp = end.Subtract(start);
return sp.Days;
}