说明:如:1900-01-01与1900-01-01之间算一天
private static int DateDiff(DateTime dateStart, DateTime dateEnd)
{
DateTime start = Convert.ToDateTime(dateStart.ToShortDateString());
DateTime end = Convert.ToDateTime(dateStart.ToShortDateString());
TimeSpan sp = end.Subtract(start);
return sp.Days;
}
{
DateTime start = Convert.ToDateTime(dateStart.ToShortDateString());
DateTime end = Convert.ToDateTime(dateStart.ToShortDateString());
TimeSpan sp = end.Subtract(start);
return sp.Days;
}