Forum Discussion

Del's avatar
Del
Qrew Cadet
6 years ago

Divide a number by duration field

I have a simple formula numeric field that i want to calculate ; formula below. The days in this invoice is a formula duration, getting error "Operator cant be applied on types number duration"


[Total]/[Days in this invoice]

------------------------------
Ermias Bean
------------------------------
  • Try this

    [Total]/ToDays([Days in this invoice])

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • Del's avatar
      Del
      Qrew Cadet
      awesome, thanks, works

      ------------------------------
      Ermias Bean
      ------------------------------
    • AmberPolston's avatar
      AmberPolston
      Qrew Cadet
      Mark,

      What if your duration field fluctuates duration...  Like some records are Hours but some are Days.

      I have a formula duration that calculates the amount of time between 2 date/time fields.  Then I want to take that and multiply it by a currency.

      4 days * 100
      4 mins * 100

      ------------------------------
      Amber Polston
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        If your rate is say 100 per 24 day,  then you would convert to hours and then multiply.

        Like

        ToHours([my duration field]) * 100



        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------