ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Core.Data.VBFunctionLib Assembly / GrapeCity.Enterprise.Data.VisualBasicReplacement Namespace / DateAndTime Class / DateDiff Method / DateDiff(String,Object,Object,FirstDayOfWeek,FirstWeekOfYear) Method
Required. DateInterval enumeration value or String expression representing the time interval you want to use as the unit of difference between date1 and date2.
Required. Date. The first date/time value you want to use in the calculation.
Required. Date. The second date/time value you want to use in the calculation.
Optional. A value chosen from the FirstDayOfWeek enumeration that specifies the first day of the week. If not specified, FirstDayOfWeek.Sunday is used.
Optional. A value chosen from the FirstWeekOfYear enumeration that specifies the first week of the year. If not specified, FirstWeekOfYear.Jan1 is used.

In This Topic
DateDiff(String,Object,Object,FirstDayOfWeek,FirstWeekOfYear) Method
In This Topic
Returns a Long value specifying the number of time intervals between two Date values.
Syntax
'Declaration
 
Public Overloads Shared Function DateDiff( _
   ByVal interval As String, _
   ByVal date1 As Object, _
   ByVal date2 As Object, _
   Optional ByVal dayOfWeek As FirstDayOfWeek, _
   Optional ByVal weekOfYear As FirstWeekOfYear _
) As Long
 

Parameters

interval
Required. DateInterval enumeration value or 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.
See Also