ASP/VBScript DateSerial() Returns the specified part of a given date.
ShotDev Focus:
- Using Asp and DateSerial() function.
Syntax
DateSerial(year, month, day)
The DateSerial function syntax has these arguments:
Part | Description |
year | Number between 100 and 9999, inclusive, or a numeric expression. |
month | Any numeric expression. |
day | Any numeric expression. |
Example
asp_dateserial.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% Response.write DateSerial(2010,09,01)&"<br>" %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_dateserial.asp
Screenshot