Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Syntax
Date.DayOfWeek(dateTime as any, optional firstDayOfWeek as nullable number) as nullable number
About
Returns a number (from 0 to 6) indicating the day of the week of the provided dateTime.
dateTime: Adate,datetime, ordatetimezonevalue.firstDayOfWeek: ADayvalue indicating which day should be considered the first day of the week. Allowed values areDay.Sunday,Day.Monday,Day.Tuesday,Day.Wednesday,Day.Thursday,Day.Friday, orDay.Saturday. If unspecified, a culture-dependent default is used.
Example 1
Get the day of the week represented by Monday, February 21st, 2011, treating Sunday as the first day of the week.
Usage
Date.DayOfWeek(#date(2011, 02, 21), Day.Sunday)
Output
1
Example 2
Get the day of the week represented by Monday, February 21st, 2011, treating Monday as the first day of the week.
Usage
Date.DayOfWeek(#date(2011, 02, 21), Day.Monday)
Output
0