Hey,
I have three columns
start_date
end_date
run_year
I want to count the number of days within one year (run_year) between two dates (start day and end_day).
For example, if the start date is 30/12/2017 and the end date is 14/01/2019, I want to get
2 days for run_year = 2017
365 days for run_year = 2018
14 days for run_year = 2019
Of course, the year of start_date can be equal to the year of end_date.
I have found a similar solution for number of days within one month between two dates, but it uses DateTimeLastOfMonth and DateTimeFirstOfMonth function, and I cannot find sth similar for years.
Thanks!
Solved! Go to Solution.
Thanks, it is working 🙂
Hi @Andrzej
I have built the logic into a workflow here:
I have built the logic up using filters instead of an if statement to check the process makes sense.
You can combine into one formula if you wish.
Edit: **bleep** people on the community are so quick, if you get distracted in building a solution it's already answered! Different logic applied though.
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |