JavaScript Basics
JavaScript Objects
JavaScript Advanced
JS Useful References
JS Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Javascript Date - valueOf Method
Description:
This method returns the primitive value of a Date object as a number data type, the number of milliseconds since midnight 01 January, 1970 UTC.
Syntax:
Here is the detail of parameters:
Return Value:
Returns the primitive value of a Date object.
Example:
<html>
<head>
<title>JavaScript valueOf Method</title>
</head>
<body>
<script type="text/javascript">
var dateobject = new Date(1993, 6, 28, 14, 39, 7);
document.write( dateobject.valueOf() );
</script>
</body>
</html>
|
This will produce following result on 29th Aug 2008 :
To understand it in better way you can Try it yourself.
|
|
|