MVC 4中的日期格式错误/日期(1426530600000)/ [英] Date Format Error in MVC 4 like /Date(1426530600000)/

查看:53
本文介绍了MVC 4中的日期格式错误/日期(1426530600000)/的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MVC-4中运行我的项目获取日期时间格式,如 /日期(1426530600000)/



如何解决此错误

谢谢

while running my project in MVC-4 getting date time format like /Date(1426530600000)/

How to resolve this error
Thanks

推荐答案

嗨Anil,



你怎么写的代码,你在哪里格式化你的日期依赖

你可以通过注释设置你的日期格式



Hi Anil,

How do you written you code and where do you formatting your date its depend
you can set your date format by annotation

[Display(Name = "Release Date")]
[DataType(DataType.Date), DisplayFormat( DataFormatString="{0:dd/MM/yyyy}", ApplyFormatInEditMode=true )]
public Nullable<datetime> release_date { get; set; }
</datetime>





请在谷歌搜索有关文化和全球化设置的更多信息。

我希望你的代码如果任何额外的问题随意发表评论将会有效。



问候,

Manoj



Please search on google for more on culture and globalization settings.
I hope your code will work if any extra question feel free put comments.

With Regards,
Manoj


这篇关于MVC 4中的日期格式错误/日期(1426530600000)/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆