PHP timestamp to HTML5 input type=datetime element

PHPWeb DevelopmentFront End Technology

For HTML5 input time, in PHP:

Example

echo date("Y-m-d\TH:i:s");

Output

The output would be:

2018-28-03T19:12:49

HTML with Timestamp would be:

<input type="datetime" value="<?php echo date("Y-m-d\TH:i:s",$timestamp); ?>"/>
raja
Published on 10-Apr-2018 09:24:01
Advertisements