0

Add 3 months to an existing date and time field

How can I create a function field to add 3 months to an existing date and time field

5replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi,

    as a formula field:

    ---

    date(year(date('date and time field')), month(date('date and time field')) + 3, day(date('date and time field'))) + time('date and time field')

    ---

    if you want to change the field, then as a button:

    ---

    'date and time field':=date(year(date('date and time field')), month(date('date and time field')) + 3, day(date('date and time field'))) + time('date and time field')

    ---

    Leo

    Like
  • Hi Leonid,  Thank you.  I have used the code you sent and its working perfectly now.  Regards Bianca

    Like
    • Katie Rayner
    • Be Legal Property Compliance
    • Katie_Rayner
    • 2 yrs ago
    • Reported - view

    This worked perfectly for me too thanks!  I created a button and was able to roll an annual subscription date to 365 days later by clicking a button :)

    'ANNUAL SERVICE EXPIRY' := date(year(date('ANNUAL SERVICE EXPIRY')), month(date('ANNUAL SERVICE EXPIRY')), day(date('ANNUAL SERVICE EXPIRY'))) + 365

    Like
  • ANNUAL SERVICE EXPIRY' := date(year(date('ANNUAL SERVICE EXPIRY'))+1, month(date('ANNUAL SERVICE EXPIRY')), day(date('ANNUAL SERVICE EXPIRY'))) 

     

    Leo

    Like
    • carabooks
    • carabooks
    • 1 yr ago
    • Reported - view

    I'm missing something about this (not surprising, as I'm a complete codeless newbie). I have a "Date received" field and am trying to calculate a "Deadline" field four months later, but it's returning a number, not a date. In my sample record, "Date received" contains "Dec 9, 2020" and the "Deadline" formula is returning "1617940800000". I originally had "Deadline" as a date field, so I recreated it as a formula field. What am I doing wrong? Many thanks in advance.

    date(year(date('Date received')), month(date('Date received')) + 4, day(date('Date received'))) + time('Date received')

    Like
Like Follow
  • 1 yr agoLast active
  • 5Replies
  • 2370Views