Good Day Everyone !!
I have a field called Ageing. It is calculated as Current Date - Rec Date.
So if my Rec date is = 2023-04-15 and Current Date = 2023-04-25 then the Ageing = 10 days.
How do i calculate Ageing (Business days) - Which is ageing minus the weekends.
In the above example ageing business = 7 days.
Thanks for suggestions
Solved! Go to Solution.
The number of Business Days between two days, ignoring holidays is calculated by the formula below:
5 * [ Full Weeks ] + 5 ( [Last Week Fraction] - [ Full Weeks ] )
Where:
Full Weeks = Floor( [ Days between dates ] / 7 )
Last Week Fraction = [ Days between dates ] / 7
Notes:
This article explains the maths How many weeks between two dates
hth
Arnaldo
Hi @AbhijeetChib ,
Formula tool only.
Not fully tested, but it seems to work in most cases 😋
Formula
DoW_RecDate = ToNumber(DateTimeFormat([Rec date],"%u"))
BusDays_FirstWeek = IF [DoW_RecDate] > 5 THEN 0 ELSE 6 - [DoW_RecDate] ENDIF
DoW_CurDate = ToNumber(DateTimeFormat([Current Date],"%u"))
BusDays_LastWeek = IF [DoW_CurDate] > 5 THEN 5 ELSE [DoW_CurDate] ENDIF
Weeks = ToNumber(DateTimeFormat([Current Date],"%W")) - ToNumber(DateTimeFormat([Rec date],"%W")) - 1
Aging_Bus = [Weeks] * 5 + [BusDays_FirstWeek] + [BusDays_LastWeek]
Output
There's a formula here for working days: Solved: Count workday difference between 2 dates - Alteryx Community