Forum Discussion

NicoleVarner's avatar
NicoleVarner
Qrew Member
5 years ago

Duration between two dates excluding weekends by hours/mins instead of days

I am trying to figure out the duration between two date/time fields and I want to exclude the weekends but I don't needs days, I need hours and mins. Everything that I have found so far says to use they numeric formula and weekdaysub. But with this, I only get days. Is there a way to either use the duration formula or use the numeric formula with the weekdaysub and format it to hours/mins?
Below is a screenshot of the formula I have now, it is including the weekends:



------------------------------
Nicole Varner
------------------------------
  • To me, the easiest thing would be to break it down into smaller bits:
     
    1. Set the Units on your Duration field properties from 'Smart Units' to 'HH:MM'
    2. Use WeekdaySub to get the # of Weekdays between the two dates
    3. Calculate the number of minutes between the starting value and midnight of that day, if the Starting value is a weekday
    4. Calculate the number of minutes between 00:01 and the ending value, if the Ending value is a weekday
    5. Add 2, 3, and 4 together 
    ​​

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quickbase Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------
    • NicoleVarner's avatar
      NicoleVarner
      Qrew Member
      Can you please show me what this would look like in a formula?

      ------------------------------
      Nicole Varner
      ------------------------------
      • NicoleVarner's avatar
        NicoleVarner
        Qrew Member
        When I use a duration formula, it will not let me use the WeekdaySub and to get HH:MM you have to use a duration formula.  When I try and use a numeric formula the HH:MM is not an option.

        ------------------------------
        Nicole Varner
        ------------------------------