<% '*** Diary Entries From Database ***' diary_var = rs("SELECT id,start_date,end_date,title,description FROM diary1 ORDER BY start_date ASC") select case (isempty(diary_var)) case true lr = -1 case else lr = ubound(diary_var,2) end select '*** Paging Results Of Array ***' todays_date = dt_format(date(),"us") for rloop = 0 to lr compare_date = diary_var(2,rloop) '*** Checking that Start Date is Different to End Date ***' start_date = "" select case (diary_var(1,rloop) <> diary_var(2,rloop)) case true start_date = dt_conversion(dt_format(diary_var(1,rloop),"us"),"us-uklong")&"  -  " end select select case (datediff("d", todays_date, compare_date)) => 0 case true diary = diary & "" &_ ""&start_date&dt_conversion(dt_format(diary_var(2,rloop),"us"),"us-uklong")&"" &_ "" &_ "" &_ ""&diary_var(3,rloop)&"" &_ "" &_ "" &_ ""&diary_var(4,rloop)&"" &_ "" &_ "" &_ " " &_ "" end select next diary = "Fundraising and Other Events

"&diary&"
" %> WEST HOUSE APPEAL—EVENTS
<%=diary%>