Date.setTime() : setTime « Date « JavaScript Tutorial





Syntax

date.setTime(milliseconds)

The setTime() method sets the time in the Date object to the argument milliseconds, an integer representing the number of milliseconds between midnight January 1, 1970 (GMT) to the desired date and time.

<html>
    <script language="JavaScript">
    <!--
    theDate = new Date();
    theDate.setTime(113220361234);

    document.write(theDate.toString());
    -->
    </script>
    </html>










12.33.setTime
12.33.1.Date.setTime()