Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.13.2 Compare date and time

Description

This operation component compares dates/times.

Options

Basic Options

(1) date1

Specify the first date and time. This is specified in one of the following formats.

  • YYYYMMDDhhmmss format (Example: 20111231000000)

  • "Date type" format (Example: Sat Dec 31 00:00:00 JST 2011)

An argument error occurs if the date and time are omitted.

"date1" and "date2" can be specified using different formats.

(2) date2

Specify the second date and time. Specify the date/time using either of the following formats.

  • "YYYYMMDDhhmmss" format (Example: 20111231010000)

  • "Date type" format (Example: Sat Dec 31 01:00:00 JST 2011)

An argument error occurs if the date and time are omitted.

"date1" and "date2" can be specified using different formats.

Advanced Options

None

Return Values

Icon

Name

Return value

Description

Old

0

The dates/times have been compared successfully. date1 is older than date2.

New

1

The dates/times have been compared successfully. date1 is later than date2.

Equal

2

The dates/times have been compared successfully. date1 and date2 are the same.

Failure

197

There is an error with the content of an option.

-

-

201

Execution of the operation component timed out.

202

The operation component has not been executed. There is a problem with the settings for executing the operation component.

203

The operation component has not been executed normally. There is a problem with the Management Server environment.

205

The operation component has not been executed. There is a problem with the input information specification of the operation component.

206

The operation component has not been executed normally. There is a problem with the output information specification of the operation component.

207

The operation component has not been executed. The operation component may not have been registered on the Management Server.

208

The Automated Operation Process has been canceled because the Automated Operation Process was recovered while the operation component was executing.

Output information

Variable

Description

Message

This variable will be set to the following message if the dates/times are compared successfully.

The operation component was successful.

If an attempt to compare the dates/times fails, the content of the error will be set as a string.

compare_result

This variable is set to the value of date1-date2. The units are seconds.

<Example 1>

If "20110728164130" and "20110727133000" are specified for date1 and date2 respectively

97890

<Example 2>

If "20110727133000" and "20110728164130" are specified for date1 and date2 respectively

-97890

returnCode

This variable is set to the return value.

Notes