ASP Is Fun

Learning ASP
Free Course
Basics
Functions
SQL Commands
Sample Code

Servers / Setup
Host Reviews
Server Setup
Error Tips

Contract ASP
Development

Intro to ASP



 
Italian Wedding


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


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



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