How to convert date format(dd/MM/yyyy) in MVC3 in foreach loop

Posted by Sampath1750 under ASP.NET on 2/29/2012 | Points: 10 | Views : 3509 | Status : [Member] | Replies : 1
Hi all,
How to convert date format(dd/MM/yyyy) in MVC3 in foreach loop Table(Same as gridview)?
My code is as follows

@Html.DisplayFor(modelItem => item.created_date)
Thanks,
Sampath bejugama




Responses

Posted by: Blessyjees on: 2/29/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

Try

item.created_date.ToString("dd/MM/yyyy")

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sampath1750, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response