Forum Discussion

ReneeHansen1's avatar
ReneeHansen1
Qrew Cadet
2 years ago

Need to Add a condition to this formula

Hi,
I have my formula, but i need to add a condition to it

LastDayOfMonth(AdjustMonth([Start Date], ToNumber([Months Needed])))

If Employment Status is FTE add 5 years to the start date (and use the last day of the month), otherwise use the formula above.

How do I add that condition?

Thank You!



------------------------------
Renee Hansen
------------------------------
  • Here is  is one solution.

    var date AdjustedStartDate = IF([Employment Status]="FTE", AdjustYear([Start date],5), [Start Date]);

    LastDayOfMonth(AdjustMonth($AdjustedStartDate, ToNumber([Months Needed])))



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • ReneeHansen1's avatar
      ReneeHansen1
      Qrew Cadet

      it's perfect, thank you so much!



      ------------------------------
      Renee Hansen
      ------------------------------