Click here to Skip to main content
15,919,774 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in c# i need to display the date format 26 Feb 2016

What I have tried:

i have using the code is
Convert.ToDateTime(Eval("CreatedDate"))).ToString("dd MM yyyy")%
Posted
Updated 1-Mar-16 21:53pm
Comments
Ralf Meier 2-Mar-16 3:44am    
Perhaps try it with one "M" more in the ToString :
Convert.ToDateTime(Eval("CreatedDate"))).ToString("dd MMM yyyy")
Richard Deeming 2-Mar-16 5:22am    
Custom Date and Time Format Strings[^]

Also, you can apply the formatting directly in the Eval statement:
Eval("CreatedDate", "{0:dd MMM yyyy}")

1 solution

You have to use this format for month string

dd MMM yyyy
 
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