I am using c#.
I know I can use
ToLongDateString()
to show something like:
Friday, February 27, 2009
What I like to do instead is show something like:
February 27, 2009
I looked around but did not find what to use to display in such a format.
The international standard recommends writing the date as year, then month, then the day: YYYY-MM-DD.
The United States is one of the few countries that use “mm-dd-yyyy” as their date format–which is very very unique! The day is written first and the year last in most countries (dd-mm-yyyy) and some nations, such as Iran, Korea, and China, write the year first and the day last (yyyy-mm-dd).
DD/MMM/YYYY. Two-digit day, separator, three-letter abbreviation of the month, separator, four-digit year (example: 25/JUL/2003) MMM/DD/YYYY. Three-letter abbreviation of the month, separator, two-digit day, separator, four-digit year (example: JUL/25/2003)
American usage calls for a month/day/year date format, the United Kingdom and much of Europe use a day/month/year format, and most countries in Asia use the year/month/day format.
var s = yourDateTime.ToString("MMMM dd, yyyy");
Check out this Custom DateTime format string
Read this: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
Try to use:
thisDate1.ToString("MMMM dd, yyyy");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With