Further to (the correct) Solutions 1 and 2 a key point to note
Quote:
what is in date and res variables is in this format: mm/dd/yyyy
is not the case.
date
and
res
are of type
DateTime
so there is no concept of "format", if you have omitted any formatting when displaying them as text, or when looking at the values in the Locals window you will see the values displayed in the default culture for your machine - US format by the look of it