Date ( month ( datefield ) ; day ( datefield ) ; year ( datefield) + 35 )
1 of 1 people found this helpful
Although I realize Phil was just giving you a quick answer to show how simple things can be, I still wouldn't hard-code the date number like this. You never know when 35 might need to be another number -- requiring you to possibly make a code change. It's better to avoid magic numbers (hard-coded constants) and instead get this value from a field. Then, if the value needs to change, you change the field (data) not code.
valid point, fmpdude!
This is where a custom function can be valuable because such value(s) can be passed as parameters to a function:
You see from the help topic, that FMPro Advanced is needed to create (and install) these, but they can be used again and again in FMPro.
If you don't have FMPA, scripting can often accomplish the same thing.
[ m = Month(dt)
; d = Day(dt)
; y = Year(dt)
; result = Date ( m ; d ; y + inc )
) // pass the values of date (dt) and increment (inc) to this function