datetime fields fix