Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 - Asset Console Creating an Access Definition File Guide


$CALCDATE (date calculation function)

$CALCDATE adds a specified number of days or hours to a date or time, then returns the arithmetic result. You can acquire relative dates and times, such as two days before or three hours after a specified date or time, without having to mentally calculate the carryover of months, days, or hours.

Organization of this page

Syntax

return-value=$CALCDATE(date/time,unit,value-to-add,output-format)

Values

Status

The following table lists and describes the possible statuses:

Status

Description

NORMAL

Normal end

Script execution interrupted

Indicates one of the following:

  • An invalid value was specified for value-to-add, such as a non-numeric value.

  • An invalid argument was specified, or an error other than the above occurred.

Example

The following example outputs the date that is 10 days before 2005/04/11:

DATE = $CALCDATE('2005/04/11','d','-10','%Y/%m/%d')
$ECHO(DATE)
Execution result:

2005/04/01