Forum Discussion

AlexBennett3's avatar
AlexBennett3
Qrew Trainee
5 years ago

Null Date Field

Hey Everyone,

I wanted to see if I could get some Formula advice. I have a formula that takes a start date and adds duration:

WeekdayAdd([Sub Start Date], ToNumber([Gas Pipe Total Duration])-1)

I had to include the -1 because I noticed it starts the count after the start date, but doesn't include the start date. 
But if the total duration is blank or 0 how can I have it not display a date? Right now it's showing the day after start date because of the -1, or just the start date if I remove the -1.

Any tips on this formula?

Thanks,

------------------------------
Alex Bennett
------------------------------
  • try this


    IF(Nz(ToNumber([Gas Pipe Total Duration])<>0,
    WeekdayAdd([Sub Start Date], ToNumber([Gas Pipe Total Duration])-1))

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • AlexBennett3's avatar
      AlexBennett3
      Qrew Trainee
      Hey Mark, I'm getting an error that is saying 'expecting bool, but found number'

      ------------------------------
      Alex Bennett
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Can you post the whole error message you get when you save, including the part where it repeats back and underlines the problem?

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