Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #hour #minute #datetime #php
ADD COMMENT
Topic
Name
1+3 =