Compare Created DateTime to DateTime.Today at 6pm, C#
- by Refracted Paladin
In C# I need to compare the value of DateTime.Today /6pm, to a field that stores the Created DateTime.
Basically there is certain functionality that is only accessible on the same day as the created day and then only till 6pm.
The part I am not fully understanding is how to accurately represent 6pm on Today to compare against. Is there a method that always returns, say, Midnight that I can then do a .AddHours(18); to?
Am I over-complicating this? Thanks.