Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Help with Dates
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Webbo
Average Member

United Kingdom
982 Posts

Posted - 27 October 2008 :  19:22:57  Show Profile  Visit Webbo's Homepage
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<

Edited by - Webbo on 27 October 2008 19:28:16

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 27 October 2008 :  21:43:35  Show Profile  Visit MaD2ko0l's Homepage
would u not need to convert Reply_MemberSponsorDate and strForumTimeAdjust date/times back to normal value by using the StrToDate function? or somthing along those lines.<

© 1999-2010 MaD2ko0l
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 October 2008 :  21:53:30  Show Profile
Haven't tested this, but maybe something like the following would do....

if Reply_MemberSponsorlevel > 0 and Reply_MemberSponsorDate > DateToStr(strForumTimeAdjust) then
	Response.Write "                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>Site Supporter</small></font><br />" & vbNewLine
end if
<
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 28 October 2008 :  02:55:39  Show Profile  Visit Webbo's Homepage
That's got it Carefree, many thanks <
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 October 2008 :  13:04:56  Show Profile
You're welcome.<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07