WorksheetFunction.Days360 Method

Returns the number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Days360 ( _
    Arg1 As Object, _
    Arg2 As Object, _
    Arg3 As Object _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Object
Dim Arg2 As Object
Dim Arg3 As Object
Dim returnValue As Double

returnValue = instance.Days360(Arg1, Arg2, _
    Arg3)
double Days360(
    Object Arg1,
    Object Arg2,
    Object Arg3
)

Parameters

  • Arg1
    Type: System.Object

    The two dates between which you want to know the number of days. If start_date (Arg1) occurs after end_date (Arg2), Days360 returns a negative number. Dates should be entered by using the DATE function, or as results of other formulas or functions.

  • Arg2
    Type: System.Object

    The two dates between which you want to know the number of days. If start_date (Arg1) occurs after end_date (Arg2), Days360 returns a negative number. Dates should be entered by using the DATE function, or as results of other formulas or functions.

  • Arg3
    Type: System.Object

    A Boolean value that specifies whether to use the U.S. or European method in the calculation.

Return Value

Type: System.Double

Remarks

Use this function to help compute payments if your accounting system is based on twelve 30-day months.The following tables contains the values for Arg3.

Method

Defined

false or omitted

U.S. (NASD) method. If the starting date is the 31st of a month, it becomes equal to the 30th of the same month. If the ending date is the 31st of a month and the starting date is earlier than the 30th of a month, the ending date becomes equal to the 1st of the next month; otherwise the ending date becomes equal to the 30th of the same month.

true

European method. Starting dates and ending dates that occur on the 31st of a month become equal to the 30th of the same month.

Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900. Microsoft Excel for the Macintosh uses a different date system as its default.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace