Hi Appsheet,
Just wanna ask if you have already come up with a built-in formula of NETWORKDAYS()? My problem basically is that, I need to count the no. of days excluding weekends and holidays from a given starting date up to now() then return that number.
Thanks in advance!
Regards,
Add a count column for worked day and just do last - the one you want from
Not very elegant but it should workโฆ
2*HOUR([DATE]-TODAY())/24-
HOUR(WORKDAY(TODAY(),HOUR([DATE]-TODAY())/24)-TODAY())/24
Thank you Aleksi!
I think this formula generates wrong result for time intervals bigger than a week or so , this being because the number of weekend days until the workday result can be bigger than the double number of weekend days from the original time interval.
I could also be wrong and just gone crazy searching for a solution for my situation.
I know this is an old reply. But hopefully, you can still help.
I have modified your formula slightly for what i need
2*HOUR([End DATE]-[Start Date])/24-
HOUR(WORKDAY([Start Date],HOUR([end DATE]-[Start Date])/24)-[Start Date])/24)
The issue I have is
if [start date] is 26/03/2021 [end date] is 29/03/2021 it comes back with 1 not 2 as 26th and 29th need to be included.
also if [Start date] is 26/03/2021 [end date] is 02/04/2021 it comes back with 4 not 6.
any ideas
Hi,
I tried another approach and it seems it works. I added โ1โ at first because I wanted to calculate total work and work starts from the beginning of the start date takes till the end of the finish date.
I assumed Saturday and Sunday are always standard weekend, thatโs why I multipled total number of weeks between two dates by 2. As an alternative, it can be set as a variable. In my case, it was not needed.
The last row counts other days off excluding weekends. I have such a table named โOff Daysโ for that.
(1+
HOUR((TODAY()-[Start Date]))/24
-(
((YEAR(TODAY())-YEAR([Start Date]))*52
+WEEKNUM(TODAY())-WEEKNUM([Start Date]))*2+
COUNT(SELECT(Off Days[Date],AND([Date]>=[Start Date],[Date]<=TODAY()),TRUE))
)
Hope it helps
Regards
thanks a lot for the solution
Youโre welcome
I am trying to count the working days between two dates , except custom holidays. In Gsheet i did it with a column =ArrayFormula(IF(LEN(B2:B);networkdays(C2:C;D2:D;โLibera Natโ!B2:B);"")) , โLibera Natโ being a custom table for holidays.
To speed and fine tune my app , i am trying to eliminate all Gsheet formulas , and i donโt know if this one can be moved in appsheet formulas in an elegant way.
Can my Gsheet formula be addapted to an Appsheet formula?
Thank you
This very topic appears to address your question.
You are right , I didnโt read enough
WORKDAY( when , days [ , holidays ] )
I am sorry , I am still struggling
This is the networkdays equivalent formula for my case presented in previous messages :
HOUR([DataConcFinal]-[DataConcStart])/24 +1 -
(
2*(weeknum([DataConcFinal])-weeknum([DataConcStart])+1) -
(ifs(weekday([DataConcStart])<>1;1)+
ifs(weekday([DataConcFinal])<>7;1))
)
-count(select(libera nat[ziua cal];and([ziua cal]>=[DataConcStart];[ziua cal]<=[DataConcFinal];weekday([ziua cal])<>1;weekday([ziua cal])<>7);true))
All my test were correct so far, and if someone sees something wrong , please tell me. I will use this as app formula to write in tables for vacation days forms.
hi i have use this function to get the number of workdays in a period of time but i need more detail such as:
start time of the start date is 2 pm.
end time of the final date is 10 am.
i need to calculate the total minuites of the workdays period. how can i do?
User | Count |
---|---|
18 | |
15 | |
10 | |
7 | |
4 |