Keep in mind i have absolutely zero idea of the rest of the app except what you show, but here's a shot at it.. this is what i would do:
- Take the take from the database
- Figure out the dates of Sun and Sat of whatever date is from DB
- If today's date is in between these, then highlight it
So here's this kinda coded up, but again, i can't guarentee it works as is since i have nothing else to go on
<% Do While Not rs.EOF %>
<%
'Make sure its a Date object
StartDate = Cdate(rs("weekstart"))
'Get the "Day of Week"
StartDayOfWeek = WeekDay(StartDate)
'Basically gets the date of "Day number 1" (sun) for this week
ThisWeek_Sunday = DateAdd(d,-(StartDayOfWeek - 1),StartDate)
'Basically gets the date of "Day number 7" (sat) for this week
ThisWeek_Saturday = DateAdd(d,(7 - StartDayOfWeek),StartDate)
if Date() >= ThisWeek_Sunday and Date() <= ThisWeek_Saturday then
'So today is in this range, so highlight it
Response.Write("<tr bgcolor=""#c0c0c0c0"">")
else
'Else don't
Response.Write("<tr>")
end if
%>
<td><%=rs("id")%></td>
<td><%=rs("weekno")%></td>
<td><%=rs("callout1")%></td>
<td><%=rs("callout2")%></td>
<td><%=rs("duty")%></td>
<td><%=rs("weekstart")%></td>
</tr>
<%
rs.MoveNext
Loop
%>
Edited by MorningZ