ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






FUNCTION:  DateSerial( )

DateSerial(Year, Month, Day)

The DateSerial function converts the arguments into the variant of subtype Date.


There are three mandatory arguments.

Year

The Year argument is the year as a string or integer.


Month

The Month argument is the month as a string or integer.


Day

The Day argument is the Day as a string or integer.

Code:
<% =DateSerial(1943, 6, 26) %>

Output:
6/26/43

Code:
<% =DateSerial("43", "6", "26") %>

Output:
6/26/43