October 19, 200421 yr Hi Guys I have two fields in my invoice database, the 'invoice due date' and the 'invoice paid date'. I would like to find out, on average, how good a client is at paying on time. So I need a script that works out the difference, as a number, between the two dates. But what I have doen doesn't work!!! For example, an invoice due on September 25th but paid on September 20th would return the value of '5'. But an invoice paid on September 30th would return the value of '-5'. My calculation below is completely wrong and I don't know what I should be doing! If ( not IsEmpty ( invoice paid date ); Int ( invoice due date - invoice paid date ) ; "" ) Can anyone help???
October 19, 200421 yr How about Case( not IsEmpty(invoice paid date); invoice paid date - invoice due date )? No Int is necessary, because mathematical calculations on date fields naturally return the answer in whole days. I would think you also want to reverse the subtraction so that clients who pay early have a negative late average.
October 19, 200421 yr Author Ah ha! Excellent my friend. Yes this works and is much better with an early payer having a negative number. Thanks V much!
Create an account or sign in to comment