Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
8 years ago

Best way to add months (duration) to a date formula?

Has anyone been able to establish the most elegant way of adding the duration in months to a date formula?

I know it's not straightforward because there are lots of variables in days in the month, and leap years etc.  However, it would be great if someone has gone through this and was prepared to share their working?

[Date Agrmnt Signed] + [Agreement Duration (Months)]

Thanks.

7 Replies

  • Just to let you know, I've figured it out

    AdjustMonth([Date Agrmnt Signed], [Agreement Duration (Months)])
  • Yes. There is an elegant way

    [Date Agrmnt Signed] + Months([Agreement Duration (Months)])

    This presumes that the [Agreement Duration (Months)] field is numeric.
  • Unfortunately, that doesn't seem to be recognised, Mark.

    Formula error -- Unknown function
    The function name Months(number) is unknown.
  • I'm having an issue as well, even using the formula above. I'm sure I'm doing something wrong. I have a date field called "hire date". I need another field to automatically add 6 months to the hire date and display it. This is the employees probation period. I want quickbase to automatically give me that date based on the "hire date". Help :(
  • Thank you so much! I figured out what I did wrong; the field type was numeric and not a date. Thank you!!