How can I convert my DateTime object to this kind of date format:
- Mmm dd yyyy
- dd Month yyyy
I am currently doing object.GetDateTimeFormats(‘D’)[1].ToString()
This is giving me January 31, 2012. But I should be able to get these two things:
- Jan 31, 2012
- 31 January, 2012
Use a custom
DateTimeformatting string:All of the custom date/time formats are listed here.