|
-
Sep 9th, 2002, 05:24 AM
#1
Thread Starter
Addicted Member
PLS help with date query
Hi
I have a date field in my sql 2000 DB called "dttripstart" It the following value:"2000-11-22 06:39:49.000" I am trying to do a select statement where dttripstart = '2000-11-22 ' How do I specify this?
Thanking you in advance
PORRASTAR
-
Sep 9th, 2002, 05:58 AM
#2
New Member
you can use this in ado:
strSQL="SELECT * FROM TableName WHERE dttripstart=#'2000-11-22#
rs.open strSQL,connection,---,---,----
-
Sep 9th, 2002, 07:42 AM
#3
Hyperactive Member
Maybe you can also place the LIKE operator in the SQL string...
"Experience is something you don't get until just after you need it."
-
Sep 9th, 2002, 08:06 AM
#4
In SQL Server 2000, use the CONVERT function to chop off the time:
SELECT * FROM TableName WHERE dttripstart = CONVERT(CHAR(10), DateCreated, 102) = '11/22/2000'
"It's cold gin time again ..."
Check out my website here.
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
|