# Calculated expiration dates based on a field with no of extensions

Copper Contributor

# Calculated expiration dates based on a field with no of extensions

I'm trying to calculate expiration dates based on an original expiration date then if it can be extended based on the number in a field use that number then it will add the amount of months in another field and add it to the original expiration date. Here is what i have so far that doesn't work

Expiration: IIf([Total Shelf life]![no of Extensions]=1,DateAdd("m",[extension 1],[shelf life exp]))

more info: the original expiration date is (shelf Life Exp). I have a field that has the number of extensions(up to 3) and fields for the months that i can be extended for each extension.(18mo for first,12mo for second, 6mo for third extension). I need to take the shelf life expiration date and determine then number of extensions and the months those extensions are and come up with a new date for each expiration date. I have fields for each new date so I can do them one at a time.

1 Reply

# Re: Calculated expiration dates based on a field with no of extensions

@lite4d That could be:

``Expiration: DateAdd("m", 6 * (3 - [no of Extensions]),[shelf life exp]))``