'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
public static int DatePart( DateInterval interval, DateTime dateValue, FirstDayOfWeek firstDayOfWeekValue, FirstWeekOfYear firstWeekOfYearValue )
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.