Funzione giorno della settimana VBScript
❮ Riferimento completo di VBScript
La funzione Giorno della settimana restituisce un numero compreso tra 1 e 7, che rappresenta il giorno della settimana.
Sintassi
Weekday(date[,firstdayofweek])
Parameter | Description |
---|---|
date | Required. The date expression to evaluate |
firstdayofweek | Optional. Specifies the first day of the week. Can take the following values:
|
Esempio
Esempio
<%
response.write(Weekday("2010-02-16",0) & "<br />")
response.write(Weekday("2010-02-16",1) & "<br />")
response.write(Weekday("2010-02-16",2) & "<br />")
response.write(Weekday("2010-02-16",3) & "<br />")
response.write(Weekday("2010-02-16",4) & "<br />")
response.write(Weekday("2010-02-16",5) & "<br />")
response.write(Weekday("2010-02-16",6) & "<br />")
%>
L'output del codice sopra sarà:
3
3
2
1
7
6
5
❮ Riferimento completo di VBScript