Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - HELP need help with listing records date
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HELP need help with listing records date

 Post Reply Post Reply Page  <123
Author
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2003 at 7:01pm
Ay, I deleted your website out of your profile as it contained a link to an adult site containing nudity. Please do not post a link to your site here as this site is visited by minors.
Thanks
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2003 at 7:06pm

so you want to filter catagories that are 20 days or newer two... in your admin panel set the date along with the new catagory. When you open your database in your catagory page, add something like my jokes site example select statement, you should get a good idea from this,

   Dim lm
   lm = Dateadd("m", -1, date())
  
   'Open connection to database
   Dim conn
   Set conn = Server.CreateObject("ADODB.Connection")
   conn.provider = "Microsoft.Jet.OLEDB.4.0"
   conn.open "c:\mfolder\accesslevel1\jokesdatabase.mdb"
  
   'Create Recordset
   Dim rs
   Set rs = Server.CreateObject("ADODB.RecordSet")
   rs.open "SELECT * FROM list WHERE additiondate >= #" & lm & "#", conn

this piece of code displays all the records added within the last month, the additiondate is located in the field 'additiondate' in my jokes database...



Edited by pmormr
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2003 at 7:09pm

the dateadd function is called on to subtract one month from today's date and write out that date. You could probably modify that function to read 'dateadd("d", -20, date())'

Back to Top
 Post Reply Post Reply Page  <123

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.