on 11-11-2017 3:20 AM
Hi Experts,
Is there a way to calculate number of working days between two dates in SDK ?
Duration = Date 2 - Date 1 gives me the duration in days while I would like to know this duration in working days.
It seems there is no way to specify WorkingDayCalendarCode.
Your inputs are highly appreciated !
Thanks & Regards
Suchita
Not as I know it.
We had a similar requirement, but ended up creating an utility to calculate the difference in working days between the two dates. Our approach was to add one working day a the time to Date1 and then check when it was equal to Date2. Depend on how many days you expect to be between the two days, you could start by adding eg 5 days, so the code doesn't have to iterate to many times.
It's not pretty, but it works.
/Anders
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.