商品保质期
//dateStart:系统时间; dateEnd :物品到期日期
DateTime dateStart = DateTime.Now.Date;//2021/7/8
DateTime dateEnd = Convert.ToDateTime("2021-07-15");
DateTime start = Convert.ToDateTime(dateStart.ToShortDateString());
DateTime end = Convert.ToDateTime(dateEnd.ToShortDateString());
//求差值
TimeSpan sp = end.Subtract(start);Console.WriteLine($"相差:{sp.Days+1}天");