1 DateTime beginTime = DateTime.Now.Date; 2 Console.WriteLine(beginTime); 3 DateTime endTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, Dat ...
1 DateTime beginTime = DateTime.Now.Date; 2 Console.WriteLine(beginTime); 3 DateTime endTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); 4 Console.WriteLine(endTime); 5 DateTime customTime = new DateTime(2018,09,03,14,30,20); 6 Console.WriteLine(customTime);