Why not put that condition in the Select statement, so you don't have to a) return more data than you need, and b) don't take time doing the comparison on each record? curious, sgd > > do while not rs.eof > response.write rs("date_completed") & " -- " & pastdate loop