Click here to Skip to main content
15,849,829 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to display date in the given format. How can I do it?

may 30 2009

Thanks in advance.
Posted
Updated 26-Nov-10 2:34am
v2
Comments
JF2015 26-Nov-10 7:34am    
Edited to improve readability.

Format(Now.Date, "MMM dd yyy")

Check this[^] for more date format options.
 
Share this answer
 
v2
Hi,

see this link for all the information needed.

http://www.csharp-examples.net/string-format-datetime/[^]
 
Share this answer
 
Go through the below link .., this may helps you

http://www.csharp-examples.net/string-format-datetime/[^]


Try yourself before posting a question.., Search in Google you will get this[^] much of links for your query
 
Share this answer
 
You can use given code display date as may 30 2009 (MM,DD,YY) format

DateTime.Now.ToString("MMMM dd, yyyy");


and for more details you should navigate given link

Custom Date and Time Format Strings[^]
 
Share this answer
 
 
Share this answer
 
try:

string strDate = String.Format("{0:MMM dd yyyy}", DateTime.Now);


I hope this help.




-------------------------------------------------------------
My site: Ofertas de Imobiliárias em Guarulhos
 
Share this answer
 
Hi Have a look here[^]

2) http://www.csharp-examples.net/string-format-datetime/

3) date time formats[^]

Generally " MMM dd yyyy " for "may 30 2009".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900