C#如何獲取今天零點的時間

1、獲取今天0點的時間函數 DateTime today1 = DateTime.Now.Date; Console.WriteLine(today1);// 2019/3/5 0:00:00 DateTime now = DateTime.Now; DateTime today2 = new DateTime(now.Year, now.Month, now.Day); Console.Wri
相關文章
相關標籤/搜索