Domino Code Fragment

Code Name*
Calculate total months between a StartDate and Today (- current month)
Date*
06/28/2025
Source (or email address if you prefer)*
[email protected]
IP address:.172.69.59.13
Description*
Possible use: To get total months an employee worked for a company to calculate vacation.
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
startMonth := @If(@Day(StartDate) > 14; @Month(StartDate) + 1; @Month(StartDate));
firstYear := 12 - startMonth;
thisyear := (@Month(@Date(@Now)) - 1);
betweenYears := ((@Year(@Now) - @Year(EPStartDate)) -1) * 12;
firstYear + betweenYears + thisYear