DAY OF( DATE )

Placeholder Tooltip Replace With
DATE d: Date A date value

Returns a Number value

This expression returns the day portion (1 to 31) of a given date.

The following computation is used to determine when a new employee can begin accruing vacation days. If the employee is hired on the first day of the month, he or she immediately begins accruing time off. Otherwise, he or she begins accruing at the beginning of the next month:

IF DAY OF ( Hire Date ) = 1

SET Start Accruing Date TO Hire Date

ELSE

SET Start Accruing Date TO DATE OF( 1, MONTH OF( Hire Date + 1 MONTHS ), YEAR OF( Hire Date + 1 MONTHS ) )

END IF