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.
firstdayofweek value
សេចក្តីពន្យល់
០
ប្រើតម្លៃលំនាំដើមប្រព័ន្ធ
១
ថ្ងៃអាទិត្យ (លំនាំដើម)
២
ថ្ងៃច័ន្ទ
៣
ថ្ងៃអង្គារ
៤
ថ្ងៃពុធ
៥
ថ្ងៃព្រហស្បតិ៍
៦
សុក្រ
៧
សៅរ៍
firstweekofyear: An optional parameter that specifies the starting week of a year.