[Contents] [Previous] [Next] [Index]

String

Converts the specified object to a string.

Core function

Implemented in

Navigator 4.0, Netscape Server 3.0

Syntax

String(obj)

Parameter

obj
An object.

Description

When the object is a Date object, String returns a string representation of the date. Its format is: Thu Aug 18 04:37:43 Pacific Daylight Time 1983.

Example

The following example converts the Date object to a readable string.

<SCRIPT>
D = new Date (430054663215); 
document.write (String(D) +" <BR>");
</SCRIPT>
This prints "Thu Aug 18 04:37:43 Pacific Daylight Time 1983."

See also

String


[Contents] [Previous] [Next] [Index]

Last Updated: 10/31/97 16:38:00


Copyright © 1997 Netscape Communications Corporation