Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Calculate off days automatically

Topic Labels: Formulas
Solved
Jump to Solution
266 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hello there,
I have been using Airtable for a few years now and I absolutely love it.

I am creating a basic HR system for a startup and I want to create a formula for the employees’ paid leaves.
Basically, each employee should receive 2 days off for every month they work for. it should be added by the end of each month.

How do I automatically make it add up in Airtable, using the joining date only?

Is there a formula for that?

Thanks in advance.

1 Solution

Accepted Solutions

Try this simplified version of the much more complicated formula I use to calculate accrued amounts:

DATETIME_DIFF(TODAY(),{1st of First Accrual Month}, 'months') * 16

Its getting the number of whole months between right now and the first month that the employee began. Its multiplied by 16 to get the number of hours earned per month (assuming 2 days = 2 * 8 hours). Change 16 to 2 if you want whole days and not hours.

The above formula relies on a field called {1st of First Accrual Month} which gets the first day of the month an employee began working. Its formula is DATETIME_FORMAT({Start Date},'YYYY-MM-01')

See Solution in Thread

2 Replies 2

Try this simplified version of the much more complicated formula I use to calculate accrued amounts:

DATETIME_DIFF(TODAY(),{1st of First Accrual Month}, 'months') * 16

Its getting the number of whole months between right now and the first month that the employee began. Its multiplied by 16 to get the number of hours earned per month (assuming 2 days = 2 * 8 hours). Change 16 to 2 if you want whole days and not hours.

The above formula relies on a field called {1st of First Accrual Month} which gets the first day of the month an employee began working. Its formula is DATETIME_FORMAT({Start Date},'YYYY-MM-01')

Thanks a million this is really helpful. I replaced the 16 with 2 and it worked!