- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Difference between datetime and datetime-local in HTML5
datetime
A date and time (year, month, day, hour, minute, second, fractions of a second) encoded according to ISO 8601 with the time zone set to UTC.
Let us see an example:
<!DOCTYPE HTML> <html> <body> <form action = "/cgi-bin/html5.cgi" method = "get"> Date and Time : <input type = "datetime" name = "newinput" /> <input type = "submit" value = "submit" /> </form> </body> </html>
datetime-local
A date and time (year, month, day, hour, minute, second, fractions of a second) encoded according to ISO 8601, with no time zone information.
Let us see an example:
<!DOCTYPE HTML> <html> <body> <form action = "/cgi-bin/html5.cgi" method = "get"> Local Date and Time : <input type = "datetime-local" name = "newinput" /> <input type = "submit" value = "submit" /> </form> </body> </html>
- Related Articles
- C# difference in milliseconds between two DateTime
- Difference between Session Storage and Local Storage in HTML5
- What is the difference between MySQL DATETIME and TIMESTAMP data type?
- Find the difference between two datetime values with MySQL?
- PHP timestamp to HTML5 input type=datetime element
- How do I print a Python datetime in the local timezone?
- Insert datetime into another datetime field in MySQL?
- MySQL to perform DateTime comparison and find the difference between dates in different columns
- How to compare Python DateTime with Javascript DateTime?
- C# Nullable Datetime
- HTML datetime Attribute
- HTML datetime Attribute
- Working with DateTime in C#
- Datetime to Integer in MySQL?
- Difference Between Local and Global Variable

Advertisements