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.