Skip to main content
Question

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

  • May 23, 2016
  • 0 replies
  • 384 views

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.

This topic has been closed for replies.

Yes. There is an elegant way

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

This presumes that the [Agreement Duration (Months)] field is numeric.

  • Author
  • Registered
  • May 23, 2016
Unfortunately, that doesn't seem to be recognised, Mark.

Formula error -- Unknown function
The function name Months(number) is unknown.

  • Author
  • Registered
  • May 23, 2016
Just to let you know, I've figured it out

AdjustMonth([Date Agrmnt Signed], [Agreement Duration (Months)])

Oh sorry. My mistake. The syntax is

AdjustMonth([Start Date], [number of months])

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 :(

AdjustMonth([Hire Date], 6)

Thank you so much! I figured out what I did wrong; the field type was numeric and not a date. Thank you!!