ASP/VBScript Weekday() Returns a whole number representing the day of the week.
ShotDev Focus:
- Using Asp and Weekday() function.
Syntax
Weekday(date, [firstdayofweek])
The Weekday function syntax has these arguments:
Part | Description |
date | Any expression that can represent a date. If date contains Null, Null is returned. |
firstdayofweek | A constant that specifies the first day of the week. If omitted, vbSunday is assumed. |
Example
asp_weekday.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% Response.write Now()&"<br>" Response.write Weekday(Date())&"<br>" %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_weekday.asp
Screenshot