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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 NewsFlash MOD
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

vesse
New Member

United Kingdom
69 Posts

Posted - 29 April 2002 :  05:21:53  Show Profile  Visit vesse's Homepage  Send vesse an AOL message  Send vesse an ICQ Message
I'm working on a NewsFlash MOD that will display alerts at the top of the page. I'm using two fields in my table called N_POSTED and N_EXPIRES. The N_POSTED is the date stored as a string using the DateToStr function while the N_EXPIRES is an interger value for the number of days for the alert to be displayed. What kinda check can I perform to see whether the posted date plus the expires is still greater than the current date beacuse at the moment I can't get the pages using this MOD to load at all and when they do I get a Script Timeout. Currently the check looks like this:

'Current Date
strSortDate = DateToStr(Now())

Then further down the actual check:

chkDate = DateToStr(DateAdd("d",rsNF("N_EXPIRES"),StrToDate(rsNF("N_POSTED"))))

if chkDate >= strSortDate then

But for some reason this causes the page to run very slowly and not load at all, some help please!?

Building Web Systems for a new Generation @ http://www.vdesign-studios.com
webmaster@vdesign-studios.com
rvesse@hotmail.com
rvesse@dhtmlshock.com

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 29 April 2002 :  05:32:51  Show Profile
It could be because there is a chkDate function in inc_functions.asp

try changing chkDate in your example above to strChkDate
Go to Top of Page

vesse
New Member

United Kingdom
69 Posts

Posted - 29 April 2002 :  05:36:09  Show Profile  Visit vesse's Homepage  Send vesse an AOL message  Send vesse an ICQ Message
Ok, I'll try that out, thanks!

Building Web Systems for a new Generation @ http://www.vdesign-studios.com
webmaster@vdesign-studios.com
rvesse@hotmail.com
rvesse@dhtmlshock.com
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.42 seconds. Powered By: Snitz Forums 2000 Version 3.4.07