...

View Full Version : DatePart question



Speedy
07-10-2004, 07:58 PM
Hi,

I have this code that I want to change from day to weeknumber:



<% Response.Write "<img src=""img/" & day(now) & ".gif"">" %>


but I have not had any luck so far so now I hope someone could help me.

/Speedy

glenngv
07-12-2004, 09:04 AM
This?

<% Response.Write "<img src=""img/" & Weekday(Now) & ".gif"">" %>

Bullschmidt
07-12-2004, 09:36 PM
And for more date ideas:

Could I get a little help with dates? - 8/15/2000
http://www.aspfaq.com/faq/faqShow.asp?fid=52

Dates & Times - Usage & Formatting by Darryl Fosbery - 7/15/2000
http://www.asp-help.com/articles/dates.asp

Speedy
07-12-2004, 10:13 PM
I solved it like this:



<% Response.Write "<img src=""Tutorials/Banner/" & Year(Now()) & "/" & DatePart("ww", Now, vbMonday, vbFirstFourDays) & ".gif"">" %>


/Speedy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum