Jul 22, 2020 08:36 AM
I have a date in CurDt and I want to add YrOffset to it and end up with a new date in a date format. YrOffset can be negative, positive or 0. I’m not sure how to do it.
Solved! Go to Solution.
Jul 22, 2020 09:06 AM
Use the DATEADD([date], [#], 'units')
formula function with 'years'
as the units.
To add one year
DATEADD({Date Field}, 1, 'years')
To subtract one year
DATEADD({Date Field}, -1, 'years')
It is documented in the formula field reference.
Jul 22, 2020 09:06 AM
Use the DATEADD([date], [#], 'units')
formula function with 'years'
as the units.
To add one year
DATEADD({Date Field}, 1, 'years')
To subtract one year
DATEADD({Date Field}, -1, 'years')
It is documented in the formula field reference.
Jul 22, 2020 10:55 AM
It worked except is added the time into the field. How do I get rid of the time and keep the date in a date format?
Jul 22, 2020 04:02 PM
I figured out how to get rid of the time, but when I try to convert back to date format it adds the time back. Here is what I have right now:
DATETIME_FORMAT(DATEADD({Cur GM Yr},yrOffset,‘years’),‘MM/DD/YYYY’)
Jul 23, 2020 01:11 AM
I figured out on the formatting setting I could tell it not to include the time.
Aug 02, 2023 04:48 PM
Thank you Kuovonne! Does anyone know how I can do this in an automation? I want to add 1 year to the date in a record when that record matches certain conditions. I appreciate your help.