Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

between dates 1

Status
Not open for further replies.

tuzojazz

Programmer
Dec 26, 2005
58
MX
Hi:

I have a table named "Calls"

Calls
----------------------------
Id Date
----------------------------
2 04/04/2006 11:33:07
3 04/04/2006 11:35:27
-----------------------------

Both records have the same date but different time

When I make this query I don't get records
-------------------------------------------------
SELECT Id, Date
FROM Calls
WHERE Date BETWEEN #4/4/2006# AND #4/4/2006#
-------------------------------------------------

Why I don't get records If all records in table "Calls" have 04/04/2006 on column "Date"?


Thanks!
 
because the column contains datetime values, not date values

:)

when you say this --

BETWEEN #4/4/2006# AND #4/4/2006#

it is the equivalent of this --

BETWEEN #4/4/2006 00:00:00# AND #4/4/2006 00:00:00#

and of course there is only one exact datetime that will satisfy that particualr condition

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top