How do I convert this time format - 1480550400000+0000 in Y/m/d date format using php
问题 I am trying to convert this time format - 1480550400000+0000 in Y/m/d date format using php date('Y/m/d',1480550400000+0000) ; but its not working. How can I make it work? 回答1: You timestamp has microseconds, so first remove it. <?php $timestamp = 1480550400000+0000; $timestamp = intval($timestamp/1000); $date = date("Y/m/d", $timestamp); echo $date; output: Check the live demo . ei@localhost:~$ php test.php 2016/12/01 回答2: $dig_date= 1480550400000+0000; $date = DateTime::createFromFormat(