Directive to set Date field plus 1 year

I have 2 fields set for dates and would like to set the second one as the first one plus 1 year. Finding that DateAdd does not work in Set Field. Also tried AddInterval with no success. I can set Today() plus or minus days, years, etc, but not an existing date field. I’ve temporarily worked around it by using a calculated field in a BAQ, but would like to set the field. Hoping this is a simple answer. Thanks in advance!!!

A little more context would help.

@EPETERS I don’t have a way to test, but the functions has AddInterval and it compiled. Is this what you tried and to @klincecum’s point can we have some background on what is failing?

BpmFunc.AddInterval(ttAPInvHedRow.InvoiceDate,1 ,IntervalUnit.Years )
2 Likes

Was leaving out “IntervalUnit.” Checked out after I added that. Thanks!!

1 Like