public static int ToSortableIntDate(this DateTime dt) { int retVal = (dt.Year*100 + dt.Month)*100 + dt.Day; return retVal; }