DatePart (interval As String, date As Date [, firstDayOfWeek As Integer [, firstWeekOfYear As Integer]]) As Long
αααααβαααα‘αα α
The extracted part for the given date.
Parameters:
interval - A string expression from the following table, specifying the date interval.
interval (string value)
ααα ααααΈβαααααα
yyyy
ααααΆα
q
αα½αβααΆαβαα½α
m
αα
y
ααααβααβααααΆα
w
ααααβααααΎααΆα
ww
αααααΆα αβααβααααΆα
d
αααα
h
αααα
n
ααΆααΈ
s
αα·ααΆααΈ
date - The date from which the result is calculated.
Date literals allow to specify unambiguous date variables that are independent from the current language. Literals are enclosed between hash signs #. Possible formats are:
#yyyy-mm-dd#
#mm/dd/yyyy#
firstdayofweek: An optional parameter that specifies the starting day of a week.