Answers for "php get 2 hours from current time"

PHP
7

get hours difference between two dates in php

$hourdiff = round((strtotime($time1) - strtotime($time2))/3600, 1);
Posted by: Guest on June-30-2020
0

php calculate hours and minutes between two times

date_default_timezone_set("Africa/Johannesburg");
    $now = new DateTime();
    $future_date = new DateTime('2020-10-21 00:00:00');
    
    $interval = $future_date->diff($now);
    
    echo ($interval->format("%a") * 24) + $interval->format("%h"). " hours". $interval->format(" %i minutes ");
    print_r($now->format('Y-m-d H:i:s'));
Posted by: Guest on December-08-2021
0

php get the two number of time second

$diff = strtotime('2009-10-05 18:11:08') - strtotime('2009-10-05 18:07:13')
Posted by: Guest on September-28-2021

Code answers related to "php get 2 hours from current time"

Browse Popular Code Answers by Language