Raymond Gonzalez Posted June 20, 2008 Posted June 20, 2008 Hello. I have 3 fields. "Start Date", "End Date" and "Plan". The "Plan" has 3 options "1 month", "3 months" and "1 year". I want that if the "Plan" is "1 month" that the "End Date" be the "Start Date" plus 1 month, and the same with the other options. How can i do it? Thanks
Quartekoen Posted June 20, 2008 Posted June 20, 2008 (edited) Change the field "End Date" to a calculation field, using the following calculation: Start Date + Case( Plan = "1 month"; 30; Plan = 3 months"; 90; Plan = "1 year"; 365) Then change the storage options so that it "Recalculates when needed." And set the result type to Date. Also, make sure your Start Date field is a Date field. Edited June 20, 2008 by Guest
Fitch Posted June 20, 2008 Posted June 20, 2008 If you want to be a bit more precise: Let( months = Case( Plan = "1 year" ; 12; GetAsNumber( Plan ) ) ; Date( Month(Start Date) + months ; Day(Start Date) ; Year(Start Date) ) ) Also, End Date could be a calculated field, but an auto-enter field could work as well.
comment Posted June 20, 2008 Posted June 20, 2008 See also: http://www.fmforums.com/forum/showpost.php?post/292727/
Recommended Posts
This topic is 6059 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