PDA

View Full Version : date vs expired


Crash1hd
08-19-2003, 10:14 PM
Why does the following code not work for me

If RS.fields("Expired") < Date Then
Call ObitsView()
Else
Call ObitsExpired()
End If

The part in red I cant figure it out cause if I put

<%=Date%><BR />
<%Response.write RS.fields("Expired")%><BR />

in the page I get the following output

8/19/2003 =Date
7/19/2003 =RS.fields("Expired")

:)

allida77
08-19-2003, 10:22 PM
Maybe is not the right varType. Try doing

CDate(RS.fields("Expired")) < date

Crash1hd
08-20-2003, 04:17 AM
Thanks! Worked Great