Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

A M-Code equivalent for =NETWORKDAYS() in excel?

So I have a start and an end date and I need to calculate turnaround time in working days. Excel has NETWORKDAYS which does the removing of weekends all by itself.  Is there an equivalent for M-C...
  • Chihiro's avatar
    Chihiro
    7 years ago

    You would invoke it in your original table as Add Columns->Invoke Custom Function. Set each argument as column and use your start date column and end date column.

     

    Edit: Or alternately use it in Advanced Editor, and pass on Start & End as variable (from calculation, another query etc). 

     

    Oh, custom function should be copied and pasted into new blank query (using advanced editor). Name it something that makes sense. (Ex: fnWorkday).