This topic is locked

Compare date and highlight row

10/2/2008 5:43:41 PM
ASPRunnerPro General questions
W
wayne author

I am trying to compare two date fields but I think I have my formula wrong. I would like to take the one date field (which is strValue) and if it is < than desired_ship_date (desired_ship_date being in the same table as the strValue) then I want the row to highlight red. This example doesnt do anything. Any ideas?
str = "<table width=100% bgcolor="

if strValue<(desired_ship_date) then

str = str & "red"

end if

str = str & "><tr><td>" & strValue & "</td></tr></table>"

strValue = str

W
wayne author 10/2/2008

nevermind, I figured out my own problem. Im a little slow I guess
str = "<table width=100% bgcolor="

if strValue<Data("desired_ship_date") then

str = str & "red"

end if

str = str & "><tr><td>" & strValue & "</td></tr></table>"

strValue = str

W
wayne author 10/2/2008

I do have one other question on this. After I enter the code it messes up the alignment and font. The cell becomes taller and not alligned with the other cells anymore. Anyone have any thoughts?