Fixed invalid date format handling