开发者

PHP date function not working as expected

I am using this echo(开发者_运维知识库date("Y",'2009-10-01')); to extract the year but it only gives me the incorrect year 1970 or 1969!

What am i doing wrong.

Thanks


change to

echo(date("Y",strtotime('2009-10-01'))); 

and try again

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜