Jet Seighart Jet Seighart - 3 months ago 9
C# Question

Comparing Dates using C#'s DateTimePicker

Let's say I have a constant date of "March 1, 2016" (MMMM dd, yyyy) format. Is there any simple way to determine that my selected date in a DateTimePicker is greater than, less than or equal to the constant date?


Simple enough ?

var fixedDate = new DateTime(2016, 3, 1);
if (myDateTimePicker.Value >= fixedDate) {