The specified value "2019-1-2" does not conform to the required format, "yyyy-MM-dd&q
Posted gangler
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The specified value "2019-1-2" does not conform to the required format, "yyyy-MM-dd&q相关的知识,希望对你有一定的参考价值。
问题:
在cshtml中转换的日期格式错误,前端报错:The specified value "2019-1-2" does not conform to the required format, "yyyy-MM-dd"
导致原因:
由于时间格式没有完全匹配,"yyyy-MM-dd"应该对应"2019-01-02"
修改代码:
string.Format("{0:yyyy-MM-dd}", DateTime.Now);
以上是关于The specified value "2019-1-2" does not conform to the required format, "yyyy-MM-dd&q的主要内容,如果未能解决你的问题,请参考以下文章
"ORA-12154: TNS:could not resolve the connect identifier specified"的解决办法
Runtime "Apache Tomcat v7.0" is invalid. The specified Tomcat installation directory does
Runtime "Apache Tomcat v7.0" is invalid. The specified Tomcat installation directory does
IDEA错误:Cannot start compilation: the output path is not specified for module "XXX".
WARN Form:308 - No configuration found for the specified action: 'loginProducer.action' in n
db2 创建实例 The host name "fordatabase" is invalid. Specify a valid host name.