I have this 13 digit timestamp 1443852054000 that i want to convert to date and time but dont succeed. I have tried this codes:
echo date('Y-m-d h:i:s',$item->timestamp);
doesnt work for me and also this
$unix_time = date('Ymdhis', strtotime($datetime ));
and this :
$item = strtotime($txn_row['appoint_date']); <?php echo date("Y-m-d H:i:s", $time); ?>
what should i use?
This timestamp is in milliseconds, not in seconds. Divide it by 1000 and use date
function:
echo date('Y-m-d h:i:s', $item->timestamp / 1000); // e.g echo date('Y-m-d h:i:s',1443852054000/1000); // shows 2015-10-03 02:00:54
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With