REALLY fix bug around date checking

Was checking for datetime when it should have been date.  Doh!