Search
 
SCRIPT & CODE EXAMPLE
 

PHP

difference between two timestamps php

$datetime1 = new DateTime('2016-11-30 03:55:06');//start time
$datetime2 = new DateTime('2016-11-30 11:55:06');//end time
$interval = $datetime1->diff($datetime2);
echo $interval->format('%Y years %m months %d days %H hours %i minutes %s seconds');//00 years 0 months 0 days 08 hours 0 minutes 0 seconds
Comment

PREVIOUS NEXT
Code Example
Php :: codeigniter 3 Configured database connection has cache enabled 
Php :: how handle the number with k in laravel balde 
Php :: forward parameter from blade to another blade with filter 
Php :: Yii2 Fatal Error: Require_Once() 
Php :: display summernonte data with string limit laravel 
Php :: laravel migrate specific file 
Php :: loop through months and year php 
Php :: how change default value for enum colun in laravel 
Php :: change php version in ubuntu 
Php :: disable SSL check in PHP cURL 
Php :: persian error laravel 
Php :: php show number 4 digit 
Php :: google client php get inbox messages 
Php :: php return json 
Php :: how import the impliment countable php 
Php :: php get domain from url 
Php :: laravel join query sum example 
Php :: symfony get api paths 
Php :: laravel model db raw count 
Php :: PHP str_shuffle — Randomly shuffles a string 
Php :: php.ini location mac 
Php :: pegar parte da string php 
Php :: asset not working in laravel 
Php :: how to remove public from url in laravel 8 
Php :: order by sum() laravel 
Php :: php server 
Php :: php artisan migrate not working 
Php :: php is scan dir recursive? 
Php :: laravel send ajax 
Php :: overwrite file php 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =