Date.DayOfWeekDate.DayOfWeek

SintaxisSyntax

 
Date.DayOfWeek(dateTime as any, optional firstDayOfWeek as nullable number) as nullable number

Acerca deAbout

Devuelve un número (del 0 al 6) que indica el día de la semana del valor dateTime proporcionado.Returns a number (from 0 to 6) indicating the day of the week of the provided dateTime.

  • dateTime: un valor date, datetime o datetimezone.dateTime: A date, datetime, or datetimezone value.
  • firstDayOfWeek: un valor Day que indica qué día debe considerarse el primer día de la semana.firstDayOfWeek: A Day value indicating which day should be considered the first day of the week. Los valores permitidos son Day.Sunday, Day.Monday, Day.Tuesday, Day.Wednesday, Day.Thursday, Day.Friday o Day.Saturday.Allowed values are Day.Sunday, Day.Monday, Day.Tuesday, Day.Wednesday, Day.Thursday, Day.Friday, or Day.Saturday. Si no se especifica, se usa un valor predeterminado que depende de la referencia cultural.If unspecified, a culture-dependent default is used.

Ejemplo 1Example 1

Definir el día de la semana representado por "Lunes, 21 de febrero de 2011" y establecer que el domingo sea el primer día de la semana.Get the day of the week represented by Monday, February 21st, 2011, treating Sunday as the first day of the week.

Date.DayOfWeek(#date(2011, 02, 21), Day.Sunday)`

1

Ejemplo 2Example 2

Definir el día de la semana representado por "Lunes, 21 de febrero de 2011" y establecer que el lunes sea el primer día de la semana.Get the day of the week represented by Monday, February 21st, 2011, treating Monday as the first day of the week.

Date.DayOfWeek(#date(2011, 02, 21), Day.Monday)

0