Excel has a function Days360 which is used to calculate the number of days between 2 dates as if each month had 30 days. It appears VBA does not have that function. DateDiff uses a 365 day calendar.
Does anyone know how to calculate on the basis of a 360 day calendar when finding the number of days between 2 dates?
I am using this in a formula in my code as follows:
PrincipalAmt x CouponRate x (Date1 - Date2) / 360 = AccruedInterest in the period
One suggestion on a previous post was to use the following:
Application.WorksheetFunction.Days360(Date1, Date2)
Date1 and Date2 populate but nothing else does. The difference between the 2 dates is not calculated. In checking the help files it appears that the Application. object is still an Excel object and not a VBA function. Can anyone else help?
Thanks, Numbers
Does anyone know how to calculate on the basis of a 360 day calendar when finding the number of days between 2 dates?
I am using this in a formula in my code as follows:
PrincipalAmt x CouponRate x (Date1 - Date2) / 360 = AccruedInterest in the period
One suggestion on a previous post was to use the following:
Application.WorksheetFunction.Days360(Date1, Date2)
Date1 and Date2 populate but nothing else does. The difference between the 2 dates is not calculated. In checking the help files it appears that the Application. object is still an Excel object and not a VBA function. Can anyone else help?
Thanks, Numbers