Reputation: 793
I am merely trying to format a datetime object but it appears to be changing the date. In the first line below, the value of ProcessBeginDate is #11/1/2014. As you can see in the image below, after assigning to a string and applying formatting, the string value is "2014-00-01".
How have I managed this??
Upvotes: 1
Views: 240
Reputation: 8160
In a custom date format string, mm
is the specifier for a 2-digit minute. The correct specifier for a 2-digit month is MM
, so your format string should be yyyy-MM-dd
.
Upvotes: 3