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 :: mobile no validation laravel 
Php :: logout in laravel 8 
Php :: whereyear laravel 
Php :: yii1 set flash 
Php :: php get string between two strings 
Php :: wordpress query orderby name 
Php :: php move file 
Php :: laravel throw exception with status code 
Php :: carbon parse from format 
Php :: disable register laravel 
Php :: how to get array dont similer elements in php 
Php :: Making visible or hidden attributes from Eloquent temporarily 
Php :: php color echo 
Php :: laravel redirect back 
Php :: how to run symfony project 
Php :: laravel json 
Php :: file original extensions laravel 
Php :: number validation in jquery 
Php :: php array to js 
Php :: upgrade php 7.3 centos 7 
Php :: Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated.", 
Php :: Yii2 Stripe Webhook testing: "[ERROR] Failed to Post" 
Php :: php transform associative array to array 
Php :: laravel create model with migration and resource controller 
Php :: how to get the values of other fields in acf validate values 
Php :: php get day diff 
Php :: teruglopende for loop php 
Php :: php loop through months 
Php :: yii2 get cookie 
Php :: laravel required if another field has value 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =