web 2.0

ASP/VBScript Weekday()

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

ASP/VBScript & Weekday()

.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.