I’m trying to add a timestamp to a file. However the DateTime Format ToString() looks weird to me.
Here is my code:
Dim _timeStamp As String = Date.Now.ToString('dd_mm_yyyy')
but the value looks like this:
_timeStamp = '03_24_2009'
I checked my PC and the current date is correct. Shouldn’t the value look like this: 03_03_2009?
For 2-digit month number, use MM not mm. Captial M’s refer to month, lowercase m’s refer to minutes.
Also, John Sheehan has a nice cheat-sheet for such things.