JavaScript method: XMLDate.getGMTSCDateTimeString()

This method returns ITSMA Service Management-formatted date/time string in Greenwich Mean Time (GMT).

Syntax

XMLDate.getSCDateTimeString();

Arguments

There are no arguments for this method.

Return values

A string or null.

The method returns a Service Management-formatted date/time string 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 Service Management-formatted date/time string 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 a Service Management date/time string..." );
var sc = d.getGMTSCDateTimeString();
print( "The Service Management GMT date/time string is: " + sc );