setTime Summary Sets the time value of the System.Date object. Signatures Click on a signature to select it and view its documentation. public double setTime(double time) public double setTime(System.Date time) Usage public double setTime(double time) public double setTime(System.Date time) Returns The current time value of the System.Date object, which represents the difference in milliseconds from the updated date/time and 1 January 1970 00:00:00:00 UTC. This is effectively the argument supplied to the setTime method. The current time value of the System.Date object, which represents the difference in milliseconds from the updated date/time and 1 January 1970 00:00:00:00 UTC. This is effectively the argument supplied to the setTime method. Parameters time The number of milliseconds elapsed since 1 January 1970 00:00:00:00 UTC. Parameters time The System.Date object to get the updated time from. Description Sets the time value of the System.Date object. Sets the time value of the System.Date object to the time value from the specified System.Date object argument. Examples Basic Usage 12345import System; Date d = new Date();d.setTime(1296547200000);Console.log(d.toString()); Basic Usage 123456import System; Date d1 = new Date(), d2 = new Date(2011, Date.Month.FEB, 10);Console.log(d1.toString());d1.setTime(d2);Console.log(d1.toString()); Share HTML | BBCode | Direct Link