Strange date behavior in view
Posted on 2008-06-09
I have a view where I pass in a where clause requesting all records on a particular date and for some records it won't retrieve them.
The field in the table is datetime and in the view i use datepart to get just the date. In my vb app I use a date variable for the requested date.
"Select * from vSchedules where scheddate = '" & dDate & "'" _
& " ORDER BY ColumnNumb, starttime"
The requested records are in the view, but I did notice the date format is different coming from vb to sql server. VB sends the date as 6/9/2008 whereas sql server has the date as 06/09/2008.
What's weird is that some records will be pulled, allthough they have the same format, but others won't.
Any ideas on what's going on and what I should do to resolved this?