What’s the quickest and easiest way to get the Min (or Max) value between two dates? Is there an equivalent to Math.Min (& Math.Max) for dates?

I want to do something like:

 if (Math.Min(Date1, Date2) < MINIMUM_ALLOWED_DATE) {
      //not allowed to do this
 }

Obviously the above Math.Min doesn’t work because they’re dates.

11 Answers
11

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *