I need to create a midnight DateTime
I've just done this:
DateTime endTime = DateTime.Now; endTime.Subtract(endTime.TimeOfDay);
Haven't test it yet, I'm assuming it works but is there a better/cleaner way?
Just use foo.Date
, or DateTime.Today
for today's date
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With