ActiveReports 12
DatePart(DateInterval,DateTime,FirstDayOfWeek,FirstWeekOfYear) Method

GrapeCity.ActiveReports.v12 Assembly > GrapeCity.Enterprise.Data.VisualBasicReplacement Namespace > DateAndTime Class > DatePart Method : DatePart(DateInterval,DateTime,FirstDayOfWeek,FirstWeekOfYear) Method
Required. DateInterval enumeration value or String expression representing the part of the date/time value you want to return.
Required. Date value that you want to evaluate.
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.
Returns an Integer value containing the specified component of a given Date value.
Syntax
'Declaration
 
Public Overloads Shared Function DatePart( _
   ByVal interval As DateInterval, _
   ByVal dateValue As Date, _
   Optional ByVal firstDayOfWeekValue As FirstDayOfWeek, _
   Optional ByVal firstWeekOfYearValue As FirstWeekOfYear _
) As Integer

Parameters

interval
Required. DateInterval enumeration value or String expression representing the part of the date/time value you want to return.
dateValue
Required. Date value that you want to evaluate.
firstDayOfWeekValue
Optional. A value chosen from the FirstDayOfWeek enumeration that specifies the first day of the week. If not specified, FirstDayOfWeek.Sunday is used.
firstWeekOfYearValue
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 an Integer value containing the specified component of a given Date value.
See Also

Reference

DateAndTime Class
DateAndTime Members
Overload List