C# 获取两个日期之间所有的日期
作者:互联网
List <DateTime> li = new List<DateTime>();
DateTime time1 = Convert.ToDateTime(CHECKIN_TIME);
DateTime time2 = Convert.ToDateTime(CHECKOUT_TIME).AddDays(-1);
while (time1 <= time2)
{
li.Add(time1);
time1 = time1.AddDays(1);
}
DateTime[] timearr = li.ToArray();//两个日期之间所有的日期
标签:Convert,C#,List,time1,li,获取,日期,DateTime 来源: https://www.cnblogs.com/codejimmygao/p/15088572.html