BusDate

The BusDate function calculates the business date for the date passed as a parameter and returns the date in the format YYYYMMDD.

When a partner is provided to the function, the holiday table for the partner is used to calculate the date. The default holiday table is used when no partner is provided to the function.

The business date is also moved if the number of days to move the date is provided as a parameter.

Return type

The function return type is: STRING

Function parameters

Table 1. BusDate assignment function parameters
Parameter order Input variable type Parameter data type Required parameter Description
1 Data field DATE Yes The date to be normalized. It could be a holiday or weekend day.
2 Valid types are:
  • Data field
  • Constant
PARTNER No The partner to use when normalizing the business date.
3 Valid types are:
  • Data field
  • Constant
SIGNED No The number of days to move the business date. The date is moved after it has been normalized.

Example

The following XML shows an example of using the BusDate function in an assignment element.
<taskDescriptor name="TaskName" type="ASSIGNMENT">
   <assignments>
      <assignment field="testBusDate" type="BusDate"
                  value="ibmNprBdDate, ibmIntPartnerId, '5'" conditions="ibmNprBdDate IS current"/>
   </assignments>
</taskDescriptor>
In this example, the BusDate function performs the following if the condition in the conditions attribute is true:
  1. Calculates the business date. It uses the holiday table for partner ibmIntPartnerId to calculate the business date.
  2. Moves the business date by five (5) business days.
  3. Assigns the result to the testBusDate field.