JavaScript method: XMLDate.getISODateTimeString()

This method returns a string containing the date and time portion of date/time object in ISO format.

Syntax

XMLDate.getISODateTimeString();

Arguments

There are no arguments for this method.

Return values

A string or null.

The method returns a string containing the ISO date and time of a date/time object or null if the conversion fails.

Example

This example does the following:

  • Creates a new XMLDate object containing today's date
  • Converts the XMLDate object to an ISO date and time then displays the result
print( "Creating XMLDate object..." );
var d = new XMLDate( new Date() );
print( "The value of the new XMLDate object is: " + d );
print( "Converting the XMLDate to ISO format..." );
var ISO = d.getISODateTimeString();
print( "The ISO date and time is: " + ISO );