Parameters
- interval
- Required. A DateInterval enumeration value or a string expression representing the time interval you want to use as the unit of difference between Date1 and Date2.
- date1
- Required. Date. The first date/time value you want to use in the calculation.
- date2
- Required. Date. The second date/time value you want to use in the calculation.
- dayOfWeek
- Optional. A value chosen from the FirstDayOfWeek enumeration that specifies the first day of the week. If not specified, FirstDayOfWeek.Sunday is used.
- weekOfYear
- Optional. A value chosen from the FirstWeekOfYear enumeration that specifies the first week of the year. If not specified, FirstWeekOfYear.Jan1 is used.
Return Value
Returns a Long value specifying the number of time intervals between two Date values.