Funzione VBScript WeekdayName


❮ Riferimento completo di VBScript

La funzione WeekdayName restituisce il nome del giorno della settimana di un giorno della settimana specificato.

Sintassi

WeekdayName(weekday[,abbreviate[,firstdayofweek]])

Parameter Description
weekday Required. The number of the weekday
abbreviate Optional. A Boolean value that indicates if the weekday name is to be abbreviated
firstdayofweek Optional. Specifies the first day of the week.

Can take the following values:

  • 0 = vbUseSystemDayOfWeek - Use National Language Support (NLS) API setting
  • 1 = vbSunday - Sunday (default)
  • 2 = vbMonday - Monday
  • 3 = vbTuesday - Tuesday
  • 4 = vbWednesday - Wednesday
  • 5 = vbThursday - Thursday
  • 6 = vbFriday - Friday
  • 7 = vbSaturday - Saturday

Esempi

Esempio 1

Ottieni il nome del 3° giorno della settimana:

<%

response.write(WeekdayName(3))

%>

L'output del codice sopra sarà:

Tuesday

Esempio 2

Ottieni il nome breve del 3° giorno della settimana:

<%

response.write(WeekdayName(3,True))

%>

L'output del codice sopra sarà:

Tue

Esempio 3

Ottieni il nome del 3° giorno della settimana, dove il primo giorno è lunedì:

<%

response.write(WeekdayName(3,False,2))

%>

L'output del codice sopra sarà:

Wednesday

❮ Riferimento completo di VBScript