自定义日期的时分秒

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);

图片 1

发表评论

电子邮件地址不会被公开。 必填项已用*标注