VBScript La funzione DateSerial
❮ Riferimento completo di VBScriptLa funzione DateSerial restituisce una variante del sottotipo Date per un anno, un mese e un giorno specificati.
Sintassi
DateSerial(year,month,day)
Parameter | Description |
---|---|
year | Required. A number between 100 and 9999, or a numeric expression. Values between 0 and 99 are interpreted as the years 19001999. For all other year arguments, use a complete four-digit year |
month | Required. Any numeric expression |
day | Required. Any numeric expression |
Esempi
Esempio 1
<%
response.write(DateSerial(2010,2,3))
%>
L'output del codice sopra sarà:
2/3/2010
Esempio 2
Sottrai 10 giorni:
<%
response.write(DateSerial(2010,2,3-10))
%>
L'output del codice sopra sarà:
1/24/2010
❮ Riferimento completo di VBScript