Date and Datetime Type classes modified to return the value from format()