Generally when Jared has to compare two dates, he'll do something simple like "if (date1 < date2) ..." A contractor no longer under his company's employ had his own unique approach...
public short TheLesserDate(string DateFrom, string DateTo) { try { string delim = "/"; string[] cons = DateFrom.Split(delim.ToCharArray()); int intDateFrom = Convert.ToInt32(cons[2]) * 10000 + Convert.ToInt32(cons[1]) * 100 + Convert.ToInt32(cons[0]); delim = "/"; cons = DateTo.Split(delim.ToCharArray()); int intDateTo = Convert.ToInt32(cons[2]) * 10000 + Convert.ToInt32(cons[1]) * 100 + Convert.ToInt32(cons[0]); if (intDateFrom < intDateTo) { return 1; } if (intDateFrom > intDateTo) { return 2; } return 0; } catch(Exception) { return 3; } }