Jump to content

This topic is 2558 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 by Steve Martino
additional info
Link to comment
Share on other sites

This topic is 2558 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.