]
 

DateSerial Function

Tips >>ASP Functions

The DateSerial function returns a Variant of subtype Date for a specified year, month, and day.


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.

The Syntax of the DateSerial function is :-

DateSerial(year,month,day)

Its description is :-

Parameter

Description
year Required. A number between 100 and 9999, or a numeric expression. Values between 0 and 99 are interpreted as the years 1900-1999. For all other year arguments, use a complete four-digit year
month Required. Any numeric expression
day Required. Any numeric expression

Example#1 :-

Code :-
document.write(DateSerial(1996,2,3) & "<br />")
document.write(DateSerial(1990-20,9-2,1-1))
Output :-
2/3/1996
6/30/1970

Example#2 :-

Code :-
<% =DateSerial(1943, 6, 26) %>
Output :-
6/26/43

 

Example#3 :-

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

6/26/43

 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

+91-9967648641

+91-9967648641