I can display server date, time using the asp now() function but im having trouble writing an asp if statement based on a date & time condition - so if date,time = something do something otherwise do something else.
this is my attempt
however regardless of what I set within 'expTime' the page always returns Auction has ended which doesnt make sense.
Please advise.
this is my attempt
Code:
<%
Dim varNow, expTime 'create variable that will store date and time
varNow=Now 'the Now function returns the date & time - assign it to the variable
expTime="10/05/2010 13:00:00"
IF varNow => expTime THEN
Response.write "<a class=""button"" href=""javascript:popWin('place-bid.asp','250','320')"">Place Bid</a>"
Else
Response.write "<span style=""color:#cc0000; font-weight:bold; font-style:italic"">Auction has ended.</span>"
END IF
%>
Please advise.
Comment