Added an error message for setting date.