Forum Discussion

AlexBennett3's avatar
AlexBennett3
Qrew Trainee
5 years ago

Finish Date Formula

Hey everyone,

I'm attempting another formula without success. I have a start date, and a Rich Text - Formula field that calculates my final numbers to display a total in Days:

(ToText(Round(([3. Close Duration]+[3. Finish Duration]+[3. Rough Duration]+[3. Sub Duration])/8, 0.01) & " " & "Days"))

My question, is how can I get that number, being used with the Start Date to calculate the Finish date? I keep getting errors since it's 'text' and can't convert to a date. 

Any help would be appreciated!

Thanks,

------------------------------
Alex Bennett
------------------------------
  • I think you just have misplaced parenthesis.
    Try this:

    ToText(Round(([3. Close Duration]+[3. Finish Duration]+[3. Rough Duration]+[3. Sub Duration])/8, 0.01))& " " & "Days"

    ------------------------------
    Ahuva Brown
    ------------------------------
    • AlexBennett3's avatar
      AlexBennett3
      Qrew Trainee
      Thanks again!

      Also, I'm not quite sure how to add an if is null function to this so that if there is no data, Days won't display. Right now every field displays 'Days' even if there is no calculation in that field. Can I use 'IsNull' to say if there is no data, then leave the field blank? Sorry still fairly new to these formulas within quickbase!

      ------------------------------
      Alex Bennett
      ------------------------------
      • AhuvaBrown's avatar
        AhuvaBrown
        Qrew Cadet
        In this case, I'd use a formula variable. I chose to name the variable numOfDays, but you can use whatever name you want.

        var text numOfDays = ToText(Round(([3. Close Duration]+[3. Finish Duration]+[3. Rough Duration]+[3. Sub Duration])/8, 0.01))& " " & "Days";

        If($numOfDays != "0", $numOfDays & " " & "Days", " ")

        If that doesn't work, try it this way. Depending on how you set up your fields, an empty result will either show up as 0 or " ":

        If($numOfDays != " ", $numOfDays & " " & "Days", " ")

        ------------------------------
        Ahuva Brown
        ------------------------------