Submit a Site

 


Automatic Scheduled Message - ASP

September 21st, 2007 | by valiik |

Want to have a dynamic message that shows only for the 4th of July? Here is how I did it:

<%
Dim fourthjul, nowmonth, nowday, fourthmon
Dim fourthday, fourthmonend, fourthdayend
nowmonth = CInt(Month(date))
nowday = CInt(Day(date))
fourthmon = CInt(5)
fourthday = CInt(25)
fourthmonend = CInt(6)
fourthdayend ? CInt(5)
if nowmonth >= fourthmon and nowday >= fourthday and nowmonth <= fourthmonend and nowday <= fourthdayend then
%>
<p><strong class="orange">Holiday Hours</strong><br />
Our Corporate Office and Customer Service will be closed<br />
<%=WeekDayName(Weekday("06-04-" & Year(date))) %>, July 4th. We will resume normal business hours on <%=WeekDayName(Weekday("06-05-" & Year(date))) %>, July 5th.
<%
end if
%>

  1. 2 Responses to “Automatic Scheduled Message - ASP”

  2. By Raynayz on Mar 18, 2008 | Reply

    omg.. good work, bro

  3. By Melissa on Jun 7, 2008 | Reply

    You guys do a wonderful job! Keep up the good work!!!

Sorry, comments for this entry are closed at this time.