Coolboy Posted July 21, 2006 Posted July 21, 2006 Name & Parameters: [color:red][big] ExpirationDate ( StartDate ; Terms ) [/big] Description: Calculates the expiration date when given the a starting date and the total of months. Sample Input: TermExpirationDate ( "1/1/2005"; "16") Results: 5/1/2006 Recursive: no Formula: Date ( Case ( Mod ( (Month( StartDate ) - 12) + Terms ;12 ) = 0; 12; Mod ( (Month( StartDate ) - 12) + Terms ;12 )) ; Day ( StartDate ); Case ( Case ( Mod ( (Month( StartDate ) - 12) + Terms ;12 ) = 0; 12; Mod ( (Month( StartDate ) - 12) + Terms ;12 )) = 12; Int(Year ( StartDate ) + (Terms + GetAsNumber ( Month ( StartDate ) )) / 12) - 1; Int(Year ( StartDate ) + (Terms + GetAsNumber ( Month ( StartDate ) )) / 12)) ) Required Functions: Author(s) Coolboy Date: 07/21/06 Credits: Disclaimer: FM Forums does not endorse or warrantee these files are fit for any particular purpose. Do not post or distribute files without written approval from the copyright owner. All files are deemed public domain unless otherwise indictated. Please backup every file that you intend to modify.
comment Posted July 24, 2006 Posted July 24, 2006 I believe Date ( Month ( StartDate ) + Terms ; Day ( StartDate ) ; Year ( StartDate ) ) should be quite sufficient.
Coolboy Posted July 25, 2006 Author Posted July 25, 2006 Hey, I guess there's always an easier way. You are certainly a lot more experienced than I.
Recommended Posts
This topic is 6694 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now