Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> Date: <input type="datetime" id="myDatetime" value="2014-02-06T10:57Z"> <p>Click the button to get the date and time of the datetime field.</p> <button onclick="myFunction()">Try it</button> <p><strong>Note:</strong> input elements with type="datetime" are not supported in any of the major browsers, except partially in Safari.</p> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myDatetime").value; document.getElementById("demo").innerHTML = x; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_datetime_value2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:32:41 GMT --> </html>
Result:
Try it Yourself - © w3schools.com