fixing invalid date formats