In C #, I need to compare the value of DateTime.Today / 6pm, with the field that the Created DateTime is stored in.
Basically, there is a certain functionality, available only on the same day as the created day, and then only until 6 pm.
The part that I donβt quite understand is how to accurately represent 6pm compared to today. Is there a method that always returns, for example, Midnight, what can I do .AddHours(18); for?
Am I complicating this too much? Thanks.
source share