calculating dates with date formula.

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered

i have date field(1st Field) and i am trying to add another field that calculates 1 year from first field. for example,

1st Field (Date Field)

2nd Field (Formula Date Field) ( this field should show 1 year from 1st field) 

i tried all i knew but didnt work. 


Please help

Photo of Y

Y

  • 40 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,448 Points 50k badge 2x thumb
Try this

AdjustYear([My date field],1)

Here is the help on that https://www.quickbase.com/db/6ewwzuuj?a=dr&rid=35&rl=dm7

It deals with Leap years too.
Photo of Neal

Neal

  • 70 Points
You can create a new date-formula field with following type of date-formula for adding one year to the given date.
AdjustYear([dt1], +1)

In the above example dt1 is a name of the  date field.

Replace "dt1" with proper date-field-name to which you are adding one year.

Neal

NealPatil @ gmx.com
Photo of Kingsly SD Samuel

Kingsly SD Samuel

  • 776 Points 500 badge 2x thumb
What is the formula if you are adding just a day, a week or a month?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,448 Points 50k badge 2x thumb
to add a day it would be

[my date field] + Days(1)

To adjust the month it would be

AdjustMonth([my date field],3) to move three months ahead.
Photo of Kingsly SD Samuel

Kingsly SD Samuel

  • 776 Points 500 badge 2x thumb
Thank you.