Steve,
It really sounds like what you want is get a value between those two. Since
you are using SQL Server, you can either use BETWEEN:
"WHERE signupdate BETWEEN CONVERT(DateTime, '2002-07-30 00:00:00', 120) AND
CONVERT(DateTime, '2002-07-30 23:59:59', 120)
OR you can use DateDiff, which I prefer better when comparing dates when I
don't care about the time
"WHERE DateDiff("d", signupdate, CONVERT(Date, '2002-07-30', 120)) = 0"
Hope this helps too!
Cory
-----Original Message-----
Subject: RE: SQL Query Question
From: "Bostrup, Tore" <[EMAIL PROTECTED]>
Date: Wed, 31 Jul 2002 15:37:21 -0400
X-Message-Number: 49
<pet peeve>
I assume the column signupdate is a Date/Time column and the database is SQL
Server:
Never compare a date with a string!
Try
Select *
from customer
where signupdate >= CONVERT(DateTime, '2002-07-30 00:00:00', 120)
and signupdate <= CONVERT(DateTime, '2002-07-30 23:59:59', 120)
</pet peeve>
HTH,
Tore.
-----Original Message-----
From: Steve Abaffy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 3:34 PM
To: ActiveServerPages
Subject: OT: SQL Query Question
Hello I have the following query
Select *
from customer
where
signupdate >= '2002-07-30 00:00:00' and signupdate <= '2002-07-30
23:59:59'
And it looks like it works it pulls up 10 records. The problem is that there
are 18 records that meet the criteria.
The following record SignUpDate are listed below that it somehow misses any
clues as to what I should be looking at???
2002-07-30 09:29:25.780
2002-07-30 10:55:58.527
2002-07-30 11:57:36.833
2002-07-30 12:01:33.663
2002-07-30 16:44:01.323
2002-07-30 12:37:29.653
2002-07-30 14:15:46.313
2002-07-30 14:11:34.650
Any help would be greatly appreciated.
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]