自定义日期的时分秒

2019-11-08 05:00 来源:未知
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

TAG标签:
版权声明:本文由金沙澳门唯一官网发布于编程教学,转载请注明出处:自定义日期的时分秒