Re: [2.0] Formating DateTime
I am not sure about the year. However, I would think you could use the padleft command to format that year.
Re: [2.0] Formating DateTime
Re: [2.0] Formating DateTime
You can convert a DateTime to a string representation by calling its ToLongDateString, ToLongTimeString, ToShortDateString, ToShortTimeString or ToString methods. The first four will use the formats specified in the system's regional settings. The fourth will also use the standard format specified in regional settings if no parameter is specified. You can also specify a format string that conforms to any of the standard format strings or custom format strings for date and time values.
To convert strings to DateTimes you would use DateTime.Parse, ParseExact, TryParse or TryParseExact, depending on whether you were sure the values was valid and whether it used a standard format or not.