Step 1: Create Prorated Monthly Salary
field
In your Employee database, add a Number field.

Step 2: Handle mid-month starts
- Add a formula to Prorated Salary. Begin with an
if()
statement that checks if the start date falls within the current month.

- If true, use the
dateDiff()
function to calculate the difference in days between the start date and the end of that month. You’ll also want to add 1 day onto this, to ensure you’re including the starting day too.

- Use
daysInMonth()
to divide by the total days in the month and calculate the prorated percentage.

- Multiply this prorated fraction by the employee’s monthly salary (annual salary divided by 12).

Step 3: Account for mid-month terminations
Extend yourIF()
formula to account for employees who terminate mid-month by adding a second condition.
- Add a second
IF()
statement by copying the formula so far, and pasting it at the end. - Then, update
This Employee.Start Date
toThis Employee.Termination Date
by clicking on each reference ofThis Employee.Start Date
-> hitting Column -> and then referencingThis Employee.Termination Date
instead. - Next, you’ll want to update the dateDiff() function so that the first argument is the start of the termination month, and the second argument is just the Termination Date itself.

Step 4: Calculate full-month salaries
Finally, handle the default case where the employee worked the full month. Set the final case to the (annual) pay rate / 12 for full-month employees.
