-
Code:
Do
if DateDiff("d",Date(),objRS("start_date")) >= 0 then
if DateDiff("d",Date(),objRS("start_date")) = 0 then
Response.Write("TODAY")
else if DateDiff("d",Date(),objRS("start_date")) <= 5 then
Response.Write("SOON")
if DateDiff("d",Date(),objRS("start_date")) > 5 then
Response.Write("GOT A WHILE")
end if
end if
objRS.MoveNext
Loop While objRS.EOF
it seems that the if statement is killing my loop, no matter what kind of loop i do, it dies and errors.
can someone explain to me why?
-
try this:
Code:
Do until objRS.EOF
if DateDiff("d",Date(),CDate(objRS("start_date"))) >= 0 then
if DateDiff("d",Date(),CDate(objRS("start_date"))) = 0 then
Response.Write("TODAY")
ElseIf DateDiff("d",Date(),CDate(objRS("start_date"))) <= 5 then
Response.Write("SOON")
ElseIf DateDiff("d",Date(),CDate(objRS("start_date"))) > 5 then
Response.Write("GOT A WHILE")
End If
End If
objRS.MoveNext
Loop
-
yea, after an hour of beating myself in the face i realized my mistake... i hate it when its something simple like that, i wanted to die.