Answers for "php get timestamp from datetime object"

PHP
0

php date object to timestamp

$date = new DateTime();
echo $date->getTimestamp();
Posted by: Guest on June-28-2019
0

php datetime from timestamp

$ts = 1171502725;
$date = new DateTime("@$ts");
Posted by: Guest on May-11-2021

Code answers related to "php get timestamp from datetime object"

Browse Popular Code Answers by Language