- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
PHP timestamp to HTML5 input type=datetime element
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); ?>"/>
Advertisements