Fixes an invalid date format