VBScript DateSerial Function
Complete VBScript Reference Manual
The DateSerial function returns a Variant of subtype Date for the specified year, month, and day.
Syntax
DateSerial(year,month,day)
| Parameters | Description |
|---|---|
| year | Required. A number or numeric expression between 100 and 9999. Values between 0 and 99 are interpreted as 1900-1999. For all other year parameters, use a full 4-digit year. |
| month | Required. Any numeric expression. |
| day | Required. Any numeric expression. |
Example
Example 1
The example above produces the following output:
2/3/2010
Try it »
Example 2
Subtract 10 days:
The example above produces the following output:
1/24/2010
Try it »
Complete VBScript Reference Manual