Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php count second different

<?php

$hour1 = '12:00:00';
$hour2 = '09:00:00';

$o1 = new DateTime($hour1);
$o2 = new DateTime($hour2);

$diff = $o1->diff($o2,true); // to make the difference to be always positive.

echo $diff->format('%H:%I:%S');
Comment

PREVIOUS NEXT
Code Example
Php :: laravel collection higher order messages 
Php :: php async curl request 
Php :: update php version of particular domain on ubuntu 
Php :: composer in serveur ionos 
Php :: laravel belongsto nested 
Php :: woocommerce php customer reset password length 
Php :: hide in nova laravel 
Php :: woocommerce subscriptions custom user rolde 
Php :: laravel attribute event 
Php :: désinfecte email php 
Php :: laravel notion require 
Php :: PHP setlocale — Set locale information 
Php :: PHP not echoing variables when print_r does 
Php :: php square root 
Php :: laravel model query time 
Php :: eager loading in hasmany belongsto relationship 
Php :: laravel mix build as umd 
Php :: Add a line break in Woocommerce Product Titles 
Php :: laravel asset resolving to http not https 
Php :: 7 reasons why Lee is an idiot 
Php :: php split string in half 
Php :: envoyer mail php depuis localhost 
Php :: laravel add params form submission 
Php :: Supprimer automatiquement les mots courts des URL pour un meilleur SEO dans WordPress 
Php :: was loaded over https, but requested an insecure xmlhttprequest endpoint laravel 
Php :: how to run php code in cmd 
Php :: salom 
Php :: installer composer dans ionos 
Php :: laravel validation on gropu route 
Php :: laravel carbon subtract minutes to current time 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =