mushin
Programmer
- Oct 4, 2000
- 49
If I execute the following query in the SQL-2000 Analyzer:
Select myDate from myTable where myDate = '11/03/2004'
I get appropriate results.
BUT,If I grab the date from a DateTimePicker on my vb.net form and execute the exact same query, I get Nothing....
The db column is a smalldatetime, (have tried datetime as well).
I have tried various combinations of output for the date,
and my .net query is identical to the one in the SQL Analyzer, visually.
I am fairly new to these products and do not see what the
big deal is here.
I have also tried concatenating the strings for time
"00:00:00" and "23:59:59" to the date with the between operator as suggested in another post.
Works in the Query tool but not in .Net !
What's the secret ? Should I just store the date as an
Integer converted from the date value and forget it ?
Thanks folks .........
Select myDate from myTable where myDate = '11/03/2004'
I get appropriate results.
BUT,If I grab the date from a DateTimePicker on my vb.net form and execute the exact same query, I get Nothing....
The db column is a smalldatetime, (have tried datetime as well).
I have tried various combinations of output for the date,
and my .net query is identical to the one in the SQL Analyzer, visually.
I am fairly new to these products and do not see what the
big deal is here.
I have also tried concatenating the strings for time
"00:00:00" and "23:59:59" to the date with the between operator as suggested in another post.
Works in the Query tool but not in .Net !
What's the secret ? Should I just store the date as an
Integer converted from the date value and forget it ?
Thanks folks .........