I want to convert negative timestamp value to human readable value. This is my code:
$timestamp = -30607469951;
$date = new DateTime();
$date->setTimestamp($timestamp);
$date->format('j/n/Y');
I want to convert negative timestamp value to human readable value. This is my code:
$timestamp = -30607469951;
$date = new DateTime();
$date->setTimestamp($timestamp);
$date->format('j/n/Y');
All i did was echo out the formatted $date
, is that what you wanted?
$timestamp = -30607469951;
$date = new DateTime();
$date->setTimestamp($timestamp);
echo $date->format('Y-m-d');