The round date to month policy masks a date by rounding the date to the first day of the original month. For example, August 21 would round to August 1. The format of the generated date will match the input date.
This policy is available with the function DateMask.roundDateToMonth().
DateMask.roundDateToMonth(record.getItem(<arg:inputAttribute>), <arg:dateFormat>)
For example, to round a date to the first day of the month in MM-dd-yyyy format, enter the following syntax:
DateMask.roundDateToMonth(record.getItem('/DEMO/ORDERS/ORDER_DATE'), 'MM-dd-yyyy')
Argument | Description |
---|---|
inputAttribute | The source attribute containing the date to mask. |
dateFormat | The format of the
date. The default is yyyy-MM-dd. The following formats are supported:
|