Copyright © tutorialspoint.com
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.
Date.valueOf() |
Here is the detail of parameters:
NA
Returns the primitive value of a Date object.
<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 :
743850547000 |
To understand it in better way you can Try it yourself.
Copyright © tutorialspoint.com