云顶娱乐平台 1

【云顶娱乐平台】c# 自定义日期的时分秒

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