JavaScript method: XMLDate.getGMTSCDateTimeString()

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