Forums

ASP

This topic is locked

Display day of the week

Posted 02 May 2002 16:56:30
1
has voted
02 May 2002 16:56:30 David Behan posted:
Programming: asp and vbscript

This may be a very simple question but I need the code to display what day of the week it is today, what it was yesterday and what it is tomorrow. Any suggestions?

I have it laid out in the format 02/05/2002 with
02 being its own variable,
05 being its own variable and
2002 being its own variable

for each of today, tomorrow and yesterday. Now my client wants to change the date format to Thursday 5 May 2002. I can do all the formatting for day of the month, month name and year but I am stuck on the displaying the day "name".

Any suggestions?

Thanks



_________________________
David Behan - www.bmor.com

Replies

Replied 08 May 2002 11:13:54
08 May 2002 11:13:54 johannes nel replied:
dim iDay
dim day
iDay =Weekday(Date, vbSunday)'' replace the vbSunday with a 1 --enums in script!!!

if iDay = 1 then
day = "Sunday"
elseif iDay = 2 then
day = "Monday"
etc...

<img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

Reply to this topic