toString (Date.toString method)

public toString() : String

Returns a string value for the specified date object in a readable format.

Availability: ActionScript 1.0; Flash Player 5

Returns

String - A string.

Example

The following example returns the information in the dateOfBirth_date Date object as a string. The output from the trace statements are in local time and vary accordingly. For Pacific Daylight Time the output is seven hours earlier than universal time: Mon Aug 12 18:15:00 GMT-0700 1974.

var dateOfBirth_date:Date = new Date(74, 7, 12, 18, 15);
trace (dateOfBirth_date);
trace (dateOfBirth_date.toString());