Steve Martino Posted April 18, 2017 Posted April 18, 2017 (edited) Hello forum. I'm trying to come up with a calculation to do the following. I know my date calc is wrong, but date calcs are just not my strong suit. It works everywhere except when crossing thru February. It's based on 3 fields with the calculation in the due date field: terms (30,60,90,120 days based on a value list),invoice date, and due date I'm trying to do 1, 2, 3, 4 months, minus a day. So technically, I think I'm doing it right, just not getting the desired result. Results: Invoice date terms due date 11/30/2016 90 days 02/29/17 <<doesn't work, gives 3/1/17 11/30/2016 60 days 01/29/17 <<works 11/30/2016 30 days 12/29/2016 <<works 11/30/2016 120 days 03/29/2017 <<works. Here's the calc: Date(Month(PAYMENTS::date_invoice)+(PAYMENTS::terms/30);Day(PAYMENTS::date_invoice)-1;Year(PAYMENTS::date_invoice)) Sample attached in FM12 Any help or pointers are always greatly appreciated Thanks Steve PAYMENTS.fmp12 Edited April 18, 2017 by Steve Martino additional info
comment Posted April 18, 2017 Posted April 18, 2017 See if this helps:http://fmforums.com/topic/59942-frequency/#comment-284146
Steve Martino Posted April 18, 2017 Author Posted April 18, 2017 This is as easy as breathing for you, isn't it? The native way with a limit works perfectly. Thanks (again and again) comment, I really appreciate it. Steve
Recommended Posts
This topic is 2844 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