Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

JScript Date Object getTime Method

Retrieves the time stored in a Date object.

Syntax: JScript Date Object getTime Method

objDate.getTime()

Arguments: JScript Date Object getTime Method

objDate

The name of a Date object. Required.

Remarks: JScript Date Object getTime Method

The getTime method returns an integer value representing the number of milliseconds between midnight, January 1, 1970 and the time stored in the Date object. The range of dates is approximately 285,616 years from either side of midnight, January 1, 1970. Negative numbers indicate dates prior to 1970.

When doing multiple date and time calculations, it is frequently useful to define variables equal to the number of milliseconds in a day, hour, or minute. For example:

varMinuteMilli = 1000 * 60

varHourMilli = varMinuteMilli * 60

varDayMilli = varHourMilli * 24

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.