JavaScript Reference/Javascript Methods/setTime
"setTime()" Example
<html>
<body>
<button onclick="var myDate = new Date(); myDate.setTime(myDate.getTime()); alert(myDate);">SETTIME</button>
</body>
</html>
"setTime()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |Date |
+----------------+--------------------------------------------------------------+
"setTime()" Syntax, Parameters and Note
Note:
Sets the time by supplying milliseconds elapsed since January 1, 1970.
Syntax:
dateName.setTime(param1)
Parameters:
param1 Required; the number of milliseconds.