469,903 Members | 1,760 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

date problem

i have a table:
RECORDS1
fields:
DATE1,NAME1

data is
21,10,2005 10:24:34 ANDY
21,10,2005 15:24:45 DAVID

i search date with this sql
select * from RECORDS1 where DATE1='21,10,2005'

nothing found its empty

i try this also
SELECT *
FROM RECORDS1
WHERE (DATE1 >= @date1) AND (DATE1 < @data1 + 1)
to parameter i put date.now value and search

this finds them when the time is before 21,10,2005 10:24:34

when the time after 21,10,2005 15:24:45 it cannot find anything
my problem is put a date parameter and search date in sql
i dont want time
i need date only

thanks
Oct 21 '05 #1
1 1106
Bafidi,

Try to use parameters for this. There are more than alone this sample
expecially for your problem on our VB-Tips website.

http://www.vb-tips.com/default.aspx?...3-eb8b44af0137

By instance a very short one with SQL and the same as this one. Be aware
that especially the parameters acts differrent between OleDb and by instance
SQLClient.

I hope this helps,

Cor
Oct 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by David B | last post: by
3 posts views Thread by Dustin Wilson | last post: by
2 posts views Thread by Julie Wardlow | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.