WeekdayName Date Function

WeekdayName Date Function
To add nice, customized messages in your newsletters, website or other net uses, the WeekdayName lets you figure out the name - Sunday, Monday, etc. - of any date.

Note that the function WeekdayName does NOT work directly on a raw date. You cannot say WeekdayName(Now()) for example. Instead, you must feed WeekdayName the *id number* of the day of the week. So for Sunday you feed it 0, for Monday you feed it 1, and so on. You figure out the weeday ID number by using the Weekday function.

For example, if you want to say the word "Saturday" on your website when it's a Saturday, you would use

currdate = now()
currid = weekday(currdate)
currname = weekdayname(currid)
response.write "today is" & currname

ASP Date Functions




RSS
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map





Content copyright © 2023 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.