当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

C# DateTime 赋值 0:00:00 - 23:59:59

        [Test]
        public void Test2()
        {
            DateTime startDate = new DateTime(2022, 10, 1, 0, 0, 0);//2022/10/1 0:00:00
            DateTime endDate = startDate.AddMonths(1).AddSeconds(-1);//2022/10/31 23:59:59

        }

 

posted @ 2023-04-24 17:51  hofmann  阅读(332)  评论(0)    收藏  举报