I'm almost ashamed to ask this, but I searched and Can't find it here.
Its a simple thing...
I want to calculate the number of "Payments" due or overdue.
The problem here is:
If today is 4/6/2011 and
ContractInitialPayment = 4/5/2011
then PaymentsDue =1
the script works. But...
If today is 4/6/2011 and
ContractInitialPayment = 3/7/2011
then PaymentsDue =2
the script fails because the second payment wouldn't be due until 4/7/2011
Thank you!
Joe
Its a simple thing...
I want to calculate the number of "Payments" due or overdue.
Code:
(I'm removing the form information to make it easier to read.)
If ContractInitialPayment > Date Then
PaymentsDue = 0
Else
PaymentsDue = DateDiff("M", ContractInitialPayment, Date) + 1
End If
The problem here is:
If today is 4/6/2011 and
ContractInitialPayment = 4/5/2011
then PaymentsDue =1
the script works. But...
If today is 4/6/2011 and
ContractInitialPayment = 3/7/2011
then PaymentsDue =2
the script fails because the second payment wouldn't be due until 4/7/2011
Thank you!
Joe