Create a new Date object based on the date object - Javascript Date

Javascript examples for Date:constructor

Description

Create a new Date object based on the date object

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//from  w  ww .ja va 2  s .  c o m
function aJaxTest(data)
{
   var d = new Date(data);
   document.getElementById("demo").innerHTML = d;
}
aJaxTest("October 13, 2014 11:13:00 +900");
    }

      </script> 
   </head> 
   <body> 
      <p id="demo"></p>  
   </body>
</html>

Related Tutorials