Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Date Object >
Date.parse() Static Method
This method converts a date string to a Date object.
Syntax
Date.parse(dateString)
Returns
A Date object representing the date in dateString.
Usage
Date.parse() is a static method, invoked using the Date constructor rather than a variable. The string must be in the following format:
Friday, October 31, 1998 15:30:00 -0800
where the last number is the offset from Greenwich Mean Time. This format is used by the dateVar.toGMTString() method and by email and Internet applications. The day of the week, time zone, time specification, or seconds field may be omitted. The statement:
var aDate = Date.parse(dateString);
is equivalent to:
var aDate = new Date(dateString);
Example
The following code fragment yields the result
9098766000:
var aDate = Date.parse("Friday, October 31, 1998 15:30:00 -0220");
TheApplication().RaiseErrorText(aDate);See Also
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference Published: 18 April 2003 |