How to add hours and seconds to specific date in PHP

1 Answer

0 votes
$date = new DateTime('2016-06-13');
$date->add(new DateInterval('PT10H30S'));
echo $date->format('Y-m-d H:i:s')
 
/*
run: 

2016-06-13 10:00:30 

*/

 



answered Jun 13, 2016 by avibootz

Related questions

1 answer 185 views
1 answer 186 views
1 answer 173 views
1 answer 115 views
115 views asked Mar 24, 2022 by avibootz
1 answer 209 views
...