Query a range of dates from Access 
Author Message
 Query a range of dates from Access

I am looking for a way to get a range of dates from an Access data base.
Does anyone does how to do this?


Thu, 17 Jul 2003 15:19:34 GMT  
 Query a range of dates from Access
Gene says:

Quote:
>I am looking for a way to get a range of dates from an Access data base.
>Does anyone does how to do this?

Really not a VBScript question,  but I'll wrap it in some VBScript to
justify it.

SQL = "SELECT * FROM TableName " & _
    "WHERE DateField < #" & MaxDate & "# AND " & _
    "DateField > #" & MinDate & "#"

Set CN = Server.CreateObject("ADODB.Connection")
CN.Open dbConnectionString
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open  SQL, CN, 0, 3

--
Randem
MCP+I / MCSE



Fri, 18 Jul 2003 04:45:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Crystal Reports 8.5 date range parameter field - record selection that includes null date range

2. VBA COntrolled Date Range in SQL Query

3. Query to select a table to use dependant on date range entered

4. 2 Q: Saving user Info -- Date range through SQL Query

5. MS-ACCESS query date problem + date formatting in datagrid

6. SQL help needed to select date range from Access DB

7. Get a Date Range from Access

8. Using SQL to select a range of dates (from And to) form access

9. Selecting Access records in date range

10. A Date range test, VB6/Access

11. Date within a Range of Dates

12. Create Date array using Date range

 

 
Powered by phpBB® Forum Software