I'm having trouble understanding what you're after here. Is it simply that you want to only look at records where fldDate is in the last 30 days?
You should be able to just use a where clause. I.e.: where table2.fldDate >= (Now () - 30) Note that Access can do the Now () - 30; you don't need to create a test date in ASP like you had in the previous question I answered. The only difference in doing this is that the date used will be the one on the database server rather than the one on the ASP server, which is probably not a problem. Dave S ----- Original Message ----- From: jenksonu To: [EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 9:14 PM Subject: [ASP] Limit count by date I'm wanting to limit the count by date, like 30 days and not max. Any help would be great. Here is my code "SELECT table2.fldusername, Count(table2.fldusername) AS CountOffldUserName, Max(table2.fldDate) AS lDate FROM table2 GROUP BY table2.fldusername ORDER BY COUNT(table2.fldUserName) DESC, (table2.fldUserName) ASC" Access database Thanks in Advance --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Sponsor ADVERTISEMENT ------------------------------------------------------------------------------ Yahoo! Groups Links a.. To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM --------------------------------------------------------------------~-> --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
