Rounds a date based upon the rounding type, unit, and anniversary that is specified.
DATEROUND(Date, RoundType, RoundUnit, AnnivMonth, AnnivDay)
Date: the date to be rounded (CALCDATE for example).
RoundType: this value can be specified in accordance with the following table:
RoundUnit: this value can be specified in accordance with the following table:
AnnivMonth: the integer value of the month that defines the start of the calendar for purposes of rounding (1-12).
AnnivDay: the integer value of the day that defines the start of the calendar for purposes of rounding (1-31).
DATEROUND(DATE(2,5,2017), 4, 3, 1, 1) will return the internal system value the date 04/01/2017 (20170401).
DATEROUND(DATE(1,1,2017), 4, 3, 1, 1) will return the internal system value the date 01/01/2017 (20170101).
DATEROUND(DATE(2,5,2017), 4, 3, 1, 15) will return the internal system value the date 04/15/2017 (20170415).