How do I show Date Format in Webgrid in MVC3 as "MM/dd/yyyy"?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
you haven't shown any code so, im going to answer what i have got you can try
grid.Column("Date",format:@<text> @item.Date.ToString("MM/dd/yyyy")</text>)
回答2:
PLease don't use magic format in ToString. You can set cultury in server or client. and use Date.ToShortDate()
标签:
asp.net-mvc-3