Forum Discussion

LyndaSchutter1's avatar
LyndaSchutter1
Qrew Trainee
2 years ago

Formula to calculate weekdays

I am trying to figure out total  "Days on Orientation and "Days Overdue".  My current formulas are able to give me the total days, and not business days. What do I need to add to the below formula to count only business days?

Total days on orientation:
If([Process Status]="Completed",([Orientation Completed]-[Effective Date]),Today()-[Effective Date])

Total Days Overdue:
Today()-[OVT Due Date]

------------------------------
Lynda Schutter
------------------------------

4 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger
    Try this

    Total days on orientation:
    If(
    [Process Status]="Completed",WeekDaySub([
    Orientation Completed], [Effective Date]),
    WeekDaySub(Today(),[Effective Date]))


    Total Days Overdue:
    WeekDaySub(Today(),[OVT Due Date])



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • LyndaSchutter1's avatar
      LyndaSchutter1
      Qrew Trainee
      Thank you so much for the quick response!
      in the first formula I get an error message  "expecting duration but found number"

      My Orientation Complete and Effective Date are both date field types and my field to display the numbers are Duration-Formula.

      Should those be something else?

      ------------------------------
      Lynda Schutter
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew #1 Challenger
        I suggest that you change the field type to formula numeric.  The is no need for the extra complexity of a duration field type when you are really just counting the integer number of days.

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------