Microsoft JScript
parse Method
Language Reference
Version 1

See Also Applies To


Description

Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.

Syntax
Date.parse(dateVal)

The dateVal argument is either a string containing a date in a format such as "Jan 5, 1996 08:47:00" or a VT_DATE value retrieved from an ActiveX or other object.

Remarks

The parse method returns an integer value representing the number of milliseconds between midnight, January 1, 1970 and the date supplied in dateVal. The parse method is a static method of the Date object. Because it is a static method, it is invoked as shown in the following code rather than invoked as a method of a created Date object.


var datestring = "November 1, 1997 10:15 AM";
Date.parse(datestring)


The following rules govern what the parse method can successfully parse:

Comments