IBM FileNet P8, Version 5.2.1            

addtimeunit

These functions return a time by adding a specified number of time units to a time.

The syntax is as follows:
  • addseconds(time_value, time_units)
  • addminutes(time_value, time_units)
  • addhours(time_value, time_units)
  • adddays(time_value, time_units)
  • addmonths(time_value, time_units)
  • addyears(time_value, time_units)
time_value
An expression of type time.
time_units

The number of time units that represent the amount of time to be added to time_value. For example, for the addseconds function, this parameter is the number of seconds to be added. To compute a past time relative to time_value, pass a negative number for this parameter.

If you enter a float value for this parameter, such as 5.4 or 27.9, only the integer part of the number is used. For example, 5.4 becomes 5.

The following example of a function call returns a time that is the specified number of hours after entry_time:
addhours(Entry_time, num_hours)

Evaluation of addmonths and addyears

The algorithm for the addmonths and addyears functions might differ from the way that comparable calculations are made in various development environments.

For the addmonths function, the addition of the specified number of months can initially produce a date beyond the end of the new month. In this case, the function returns the first day of the next month. For example, the following expression returns 03/01/1997:
addmonths(convert("01/31/1997 12:00:00", time), 1)
Evaluations of the addyears function are comparable. For example, the following expression returns 03/01/2001:
addyears(convert("02/29/2000 12:00:00", time), 1)
The time format that you enter (in this case, the full date and time) must match the date/time mask on the workflow system. For more information, see Date/time masks.


Last updated: March 2016
bpfe022.htm

© Copyright IBM Corporation 2016.