VBScriptDateSerial関数_
❮完全なVBScriptリファレンスDateSerial関数は、指定された年、月、日のサブタイプ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リファレンス