Home  >  Article  >  Backend Development  >  thinkPHP的模版格式化时间的有关问题

thinkPHP的模版格式化时间的有关问题

WBOY
WBOYOriginal
2016-06-13 13:22:48961browse

thinkPHP的模版格式化时间的问题
我在模版上格式化时间

HTML code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
<eq name="vo.rectype" value="1">{$vo['recstart']|date="Y-m-d H:i:s",###}</eq>
<eq name="vo.rectype" value="2">{$vo['recstart']|date="Y-m-d",###}</eq>


怎么输出的是
HTML code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
 1970-01-01 


这是为什么啊? 急求。。。。

------解决方案--------------------
不会啊 ,帮你顶一下
------解决方案--------------------
date()函数是那么用的?不是date("Y-m-d H:i:s")这样?
------解决方案--------------------
{$vo['recstart']}
输出的是什么?
------解决方案--------------------
应该是$vo['recstart']的值为null或者为0了,导致输出的时间为1970-01-01。
你再检查下你后台的赋值。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn