VBScript Funkcja DateSerial
❮ Pełne odniesienie do VBScriptFunkcja DateSerial zwraca wariant podtypu Date dla określonego roku, miesiąca i dnia.
Składnia
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 |
Przykłady
Przykład 1
<%
response.write(DateSerial(2010,2,3))
%>
Wynikiem powyższego kodu będzie:
2/3/2010
Przykład 2
Odejmij 10 dni:
<%
response.write(DateSerial(2010,2,3-10))
%>
Wynikiem powyższego kodu będzie:
1/24/2010
❮ Pełne odniesienie do VBScript