Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

HTML Reference
Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

WeekdayName

The WeekdayName function returns the name for the day of the week. The only required parameter is a Date or Datetime expression that the function should return the day of the week for.

The optional second parameter is a boolean which indicates whether the function should return an abbreviated version of the weekday name (true) or the full weekday name (false).

An optional third parameter indicates which day represents the first day-of-the-week. If not supplied, the default will be Sunday. Valid values you may pass for this parameter are shown in the table below.

Constant Value Meaning
vbSunday 1 Sunday
vbMonday 2 Monday
vbTuesday 3 Tuesday
vbWednesday 4 Wednesday
vbThursday 5 Thursday
vbFriday 6 Friday
vbSaturday 7 Saturday


Dim dDate
dDate = Now()
' build the weekday based on the default setting Response.Write "Weekday is: " & Weekday(dDate) & "<BR>"
Response.Write "Weekday Name is: " & WeekdayName(dDate) & "<BR>"

' build the weekday based on first day of monday Response.Write "Weekday is: " & Weekday(dDate, vbMonday) & "<BR>"
Response.Write "Weekday Name is: " & WeekdayName(dDate, false, vbMonday) & "<BR>"


This method is very useful for displaying the current day-of-the-week and also for building a calendar application. You can retrieve individual parts of a date using the Year, Month and Day functions as well as the DatePart function.

Orvado Technologies

ASP Nuke CMS
Free Open Source
Content Manager
HomeFix Boards
Home Remodeling
Message Boards

Contact Us | Contribute | About | Site Map



"Damn the torpedoes! Full speed ahead!" - David G. Farragut

©2007 Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.