Help

Calculate off days automatically

Topic Labels: Formulas
Solved
Jump to Solution
1015 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Hamda_Alansaari
4 - Data Explorer
4 - Data Explorer

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
Kamille_Parks
16 - Uranus
16 - Uranus

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
Kamille_Parks
16 - Uranus
16 - Uranus

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')

Hamda_Alansaari
4 - Data Explorer
4 - Data Explorer

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