Converts this to a string in the format described by format.
format
a Date
the format to generate the date in
this as a string