VBScript Функция DateSerial
❮ Полный справочник VBScriptФункция DateSerial возвращает Variant подтипа Date для указанного года, месяца и дня.
Синтаксис
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 |
Примеры
Пример 1
<%
response.write(DateSerial(2010,2,3))
%>
Вывод кода выше будет:
2/3/2010
Пример 2
Вычесть 10 дней:
<%
response.write(DateSerial(2010,2,3-10))
%>
Вывод кода выше будет:
1/24/2010
❮ Полный справочник VBScript