JavaScript Basics
JavaScript Objects
JavaScript Advanced
JS Useful References
JS Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Javascript Date parse() Method
Description:
Javascript date parse() method takes a date string and returns the number of milliseconds since midnight of January 1, 1970.
Syntax:
Note: Paramters in the bracket are always optional
Here is the detail of parameters:
Return Value:
Number of milliseconds since midnight of January 1, 1970.
Example:
<html>
<head>
<title>JavaScript parse Method</title>
</head>
<body>
<script type="text/javascript">
var msecs = Date.parse("Jul 8, 2008");
document.write( "Number of milliseconds from 1970: " + msecs );
</script>
</body>
</html>
|
This will produce following result :
Number of milliseconds from 1970: 1215455400000
|
To understand it in better way you can Try it yourself.
|
|
|