Re: Help with Date
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 04/22/04
- Next message: Dave Anderson: "Re: apostrophes in SQL statement"
- Previous message: Chris Hohmann: "Re: Tree menu"
- In reply to: Ben: "Help with Date"
- Next in thread: Ben Dunlap: "Re: Help with Date"
- Reply: Ben Dunlap: "Re: Help with Date"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Apr 2004 14:49:37 -0400
Ben wrote:
> Im writing a script that will get the last 7 days of information, more
> specifically the points within those 7 days. What I have works some of
> the time, but it doesn't work all of the time, if a user hasn't
> entered anything for 7 days it crashes, thanks for any help.
> ------------------------------------------------------------------
> i = 0
> x = 7
> 'Create an ADO recordset object
> Set rs_rufitPoints = Server.CreateObject("ADODB.Recordset")
>
> 'Initialise the strSQL variable with an SQL statement to query the
> database
> strSQL = "SELECT points, actDate FROM tblActivity WHERE USER_ID = "&
> ret_ID &" ORDER BY actdate DESC"
:-)
This is silly. If you want the last 7 days, then retrieve the last 7 days.
What database are you using?
Bob Barrows
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
- Next message: Dave Anderson: "Re: apostrophes in SQL statement"
- Previous message: Chris Hohmann: "Re: Tree menu"
- In reply to: Ben: "Help with Date"
- Next in thread: Ben Dunlap: "Re: Help with Date"
- Reply: Ben Dunlap: "Re: Help with Date"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|