dongyao4003 2013-08-26 07:12
浏览 50
已采纳

从Datetime获取日期字符串[复制]

This question already has an answer here:

This is my String Tue, 20 Aug 2013 10:45:05 and i want to this string in Date Format Like this :

2013-08-20.

Guys Please help.

Thanks

</div>
  • 写回答

2条回答 默认 最新

  • dongxian7194 2013-08-26 07:13
    关注

    Try this,

    $d=date('Y-m-d',strtotime('Tue, 20 Aug 2013 10:45:05'));
    echo $d;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?