|
-
Nov 23rd, 1999, 01:46 PM
#1
Thread Starter
Junior Member
Given two dates, start_date and end_date.
How can I retrieve all records from the database, a create_date attribute is specified in the table, that are within the given date interval?
e.g.
start_date = "8/13/1999"
end_date = "11/12/1999"
records to retrieve should be in the range of the two given date.
Thanks.
-
Nov 23rd, 1999, 03:24 PM
#2
Hyperactive Member
Try this
Select * from abcd where efgh >= DateValue(startdate) and efgh <= datevalue(enddate)
efgh is the date field in the database
-
Nov 23rd, 1999, 11:39 PM
#3
Addicted Member
MSDNexpert was right but try it this way:
stdate= DateValue(start_date)
eddate= DateValue(end_date)
"Select * from abcd where efgh >= #" & stdate & "# and efgh <= #" & eddate & "#"
------------------
Jorge Ledo
[email protected]
Portugal
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|