Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to add hour minute seconds in php datetime

date('Y-m-d H:i',strtotime('+1 hour +20 minutes',strtotime($start)));
Comment

php datetime add one hour

$date = new DateTime('2006-12-12 15:00');
$date->modify('+1 hour');
echo $date->format('Y-m-d');	// 2006-12-12 16:00
Comment

add hour minute in datetime in php

$minutes_to_add = 5;

$time = new DateTime('2011-11-17 05:05');
$time->add(new DateInterval('PT' . $minutes_to_add . 'M'));

$stamp = $time->format('Y-m-d H:i');
Comment

PREVIOUS NEXT
Code Example
Php :: laravel websockets onsubscribe 
Php :: how to display the taxonomy image in wordpress 
Php :: random digit with seed php 
Php :: php pdo update 
Php :: php empty object 
Php :: select max id laravel 
Php :: wp get tagline php 
Php :: print array items in php 
Php :: send value from one page to another in php 
Php :: yii2 activeform 
Php :: show random post in laravel 
Php :: lumen file upload 
Php :: php mac address 
Php :: how to use flash message in laravel 
Php :: file put contents append 
Php :: php get second last element of array 
Php :: snap store phpstrom 
Php :: migrations required field laravel 
Php :: laravel force delete 
Php :: download html content from url php 
Php :: php date + 30 days 
Php :: Theme and plugin editor in wp dashboard missing 
Php :: remove item from collection 
Php :: get absolute path php file 
Php :: array_diff 
Php :: string to boolean php 
Php :: cut long text laravel blade 
Php :: password validation rules laravel 
Php :: generate laravel event 
Php :: search by date using carbon laravel 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =