I'm trying to compare a date against the forum date to calculate whether or not to display a line of text using the following code:
if Reply_MemberSponsorlevel > 0 and Reply_MemberSponsorDate > strForumTimeAdjust then
Response.Write " <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>Site Supporter</small></font><br />" & vbNewLine
end if
The Sponsor Date is written into the database as (eg): 20081026000000 (ie YYYYMMDDHHMMSS), using the following:
strSql = strSql & ", M_SPONSORDATE = " & DatetoStr(cDate(Request.Form("SPONSORDATE")))
So basically what I'm trying to achieve is if a member's sponsor level is above zero (ie a sponsor), and their sponsor date (which is the date they're a sponsor until) is after the current date of the forum (ie today's date) then 'Site Supporter' will be displayed
Unfortunately the dates don't seem to be being taken into a account and 'Site Supporter' shows regardless of whether or not the sponsor date is before or after the forum date
Can anyone point out where I might be going wrong?
Thanks<