ASP Is Fun

Learning ASP
Free Course
Basics
Functions
SQL Commands
Sample Code


Servers / Setup
Host Reviews
Server Setup
Error Tips


Contract ASP
Development

Search For:


Intro to ASP


 


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 and Time Functions



Bookmark this site so you can reference it any time you have ASP questions in the future!




ASP Main Page | ASP Ebooks | Free ASP Course | Contact Lisa
All content copyright © 2012 Minerva WebWorks LLC. All rights reserved.

Irish Wedding


Free Newsletter!

Ebooks
Intro to ASP
ASP SQL DB
Members
Shopping


Introduction to ASP

Romance Tips
Irish Romance
Italian Romance
French Romance

ASP Poll
How do you handle 500 errors?
I don't
Page does nothing
Displays error
Emails error