Answers for "php input date and time with start time of current timestamp"

PHP
0

calculate total time from start and end datetime in php

date1 = new DateTime('2006-04-12T12:30:00');
$date2 = new DateTime('2006-04-14T11:30:00');

$diff = $date2->diff($date1);

$hours = $diff->h;
$hours = $hours + ($diff->days*24);

echo $hours;
Posted by: Guest on June-20-2020
0

current date time in php for input

<input type="datetime-local" name="followupon" value=<?php echo date('Y-m-d\TH:i:s'); ?>">
Posted by: Guest on May-03-2021

Code answers related to "php input date and time with start time of current timestamp"

Browse Popular Code Answers by Language