1 of 1 people found this helpful
FM is actually good at this and it is very easy to put together.
Try this in the data viewer, which will give you the date 16 months ago. You can do the same "math" for days and years, just subtract how many you want from the relevant part
_now = get(CurrentDate) ;
_date = Date ( month( _now ) - 16 ; day ( _now ) ; year ( _now ) )
Thank you so much. I can't believe it was that simple.
Yep! FileMaker dates do math!!
you can add/subtract days
mydate + 20
or as Wim showed you, you can add/subtract just the months, days and/or years. FileMaker has this 'magic' that can get you the correct year even when it may span years and the calc is on the month!!