Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Date Format in Day, Month Day, Year

Tags:

c#

datetime

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.

like image 307
Nate Pet Avatar asked Sep 24 '13 18:09

Nate Pet


People also ask

How do you write date with day month and year?

The international standard recommends writing the date as year, then month, then the day: YYYY-MM-DD.

What is the date in day-month-year format?

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).

What is date format DD MMM YYYY?

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)

How do you format date and day?

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.


2 Answers

var s = yourDateTime.ToString("MMMM dd, yyyy");

Check out this Custom DateTime format string

like image 30
King King Avatar answered Oct 07 '22 14:10

King King


Read this: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

Try to use:

thisDate1.ToString("MMMM dd, yyyy");
like image 75
Vajda Endre Avatar answered Oct 07 '22 12:10

Vajda Endre