Best way to create a Midnight DateTime in C#

前端 未结 7 1112
南旧
南旧 2020-12-29 01:00

I need to create a midnight DateTime

I\'ve just done this:

DateTime endTime = DateTime.Now;
endTime.Subtract(endTime.TimeOfDay);

Ha

相关标签:
7条回答
  • 2020-12-29 01:29

    DateTime.Today

    0 讨论(0)
提交回复
热议问题