VBScript DateSerial
Function
The DateSerial function returns a Variant of subtype Date for the specified year, month, and day.
Syntax
Parameter | Description |
---|---|
year | Required. A number between 100 and 9999, or a numeric expression. Values between 0 and 99 are interpreted as 1900–1999. For all other year parameters, use the full 4-digit year. |
month | Required. Any numeric expression. |
day | Required. Any numeric expression. |
Example
Example 1
Output of the above example:
Example 2
Subtracting 10 days:
Output of the above example: