Forum Moderators: open

Message Too Old, No Replies

ASP Timed include

How do I include a short message based on the date

         

donnalorr

4:23 pm on Apr 10, 2006 (gmt 0)

10+ Year Member



Hi ..I know this is not difficult, but I can't figure it out. I run a school website, and want to put a timed message based on the date (like if it's from April 13th-18th , I want to say "schools closed for Easter", otherwise the message defaults to "all schools open". The site uses asp, but if there's another way, I'm open to that also. I saw some code on "hide" and "show, but that doesn't seem to work. Help! thanks very much

defanjos

4:52 pm on Apr 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This should work:

<%
if month(date)= 4 AND Day(Date)=> 13 AND Day(Date)=< 18 AND Year(Date)=2006 then
response.write "schools closed for Easter"
else
response.write "all schools open"
end if
%>

donnalorr

7:09 pm on Apr 10, 2006 (gmt 0)

10+ Year Member



It worked..Thanks so much!