Determine the number of days between two dates using the specified day count basis (either US_NASD_30_360 or European_30_360 ).
Signature (Visual Basic / VBA)
Public Function Days360( _
ByVal vFm As Variant _
, ByVal vTo As Variant _
, Optional ByVal vEuroMethod As Variant _
, Optional ByVal vExcelVersion As Variant _
) As Variant
The beginning (first day) of the date interval. Function returns Null if vFm is Null or cannot be interpreted as a Date. The time component of vFm (if any) is ignored.
vTo
The end (last day) of the date interval. Function returns Null if vTo is Null or cannot be interpreted as a Date. The time component of vTo (if any) is ignored.
vEuroMethod
Optional True or False value. True if the European 30/360 day count basis should be used, and False if the US NASD 30/360 day count basis should be used. vEuroMethod defaults to False (use the US NASD 30/360 day count basis) if it is missing or Null or cannot be interpreted as a Boolean value.
vExcelVersion
Optional True or False value. True if the function should return the exact same results as the Microsoft Excel DAYS360 function, and False if it should use the Securities Industy Association definition of the 30/360 day count basis. vExcelVersion defaults to False (use the SIA definition for the US NASD 30/360 day count basis) if it is missing or Null or cannot be interpreted as a Boolean value.
Notes & Version History
Details
See the Days360Verify Subroutine for more examples of this Function.
Note
This function returns the exact same results as the Microsoft Excel DAYS360 function when the vExcelVersion argument is True. When the vExcelVersion argument is False, this function and the Excel Days360 function differ on the following dates: (This is the output of the Days360ExcelTest Subroutine.)
v2.0 Addition
This function is new to this version of Entisoft Tools.