Forum Discussion

dbryant4891's avatar
dbryant4891
Qrew Trainee
4 years ago

Which type conversion for adding days to a date field?

I've searched through the Quick Base community using so many keywords and can't seem to find the answer to what I need.  I have a date field [Letter Date] and a text-multiple choice field [# of Days Until Due].  I've created a formula date field [Audit Due Date] that should return the calculated date.  The formula I entered initially was [Letter Date] + [# of Days Until Due]...however, no matter what  type conversion I add to the beginning of whichever field is on the right side of the plus sign, it says it can't be done, and understandably so.  Which type conversion should I be using to make this work?

Additional note, my [# of Days Until Due] field is multiple choice so that the user can choose the number of days until the audit is due, such as 30, 45, 60, 90; therefore, the multiple choice options are numbers only (i.e., not "30 days", "45 days", etc.)

Thanks for any help in advance.

------------------------------
Danaya Bryant
Business Analyst
The van Halem Group
Atlanta GA
------------------------------
  • try this

    [Letter Date] + Days(ToNumber([# of Days Until Due]))


    // the formula above first converts the multiple choice text field for days from text to a number.  Then converts that to a duration of the # of days and adds that to the date.​

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • dbryant4891's avatar
      dbryant4891
      Qrew Trainee
      Thank you Mark, that did exactly what I was looking for!

      ------------------------------
      Danaya Bryant
      Business Analyst
      The van Halem Group
      Atlanta GA
      ------------------------------