AbsTime

The AbsTime function returns the date and time in the format YYYYMMDDHHMM.

The values used for the date and time to be returned depends on which parameters are passed to the function.
  • If no parameters are passed to the function, the current date and time are used.
  • If only the date is passed to the function, the current time is appended to the date in the parameter.
  • If only the time is passed to the function, the time passed to the function is appended to the current date.
  • If both parameters are passed to the function, they are converted into the proper format.

Return type

The function return type is: STRING

Function parameters

Table 1. AbsTime assignment function parameters
Parameter order Input variable type Parameter data type Required parameter Description
1 Data field DATE No The date to be used.
2 Valid types are:
  • Data field
  • Constant
TIME No The time to be used.

Example

The following XML shows an example of using the AbsTime function in an assignment element.
<taskDescriptor name="TaskName" type="ASSIGNMENT">
   <assignments>
      <assignment field="testAbsTime" type="AbsTime" value="ibmNprBdDate, '1225'"/>
   </assignments>
</taskDescriptor>
In this example, the AbsTime function performs the following:
  1. Uses the date from ibmNprBdDate as the date in the string to be returned.
  2. Uses the value 1225 as the time in the string to be returned.
  3. Assigns the result to the testAbsTime field.