Allow dates to be formatted in error messages