In SQL server any date stored as type DateTime or SmallDateTime is going to have a time component so you would need to eliminate it to search for a date equal to a specified date. One way to do that would be to use a select statement similar to the following
SELECT * FROM [Table] WHERE CONVERT(Char(10),[DateTimeColumn],101) =@SearchDate
If you were using a DateTimePicker to specify the search date, your search parameter would be something like
@SearchDate = String.Format(“{0:MM/dd/yyyy}”, DateTimePicker.value)
Another possibility I considered was adding a computed column (DateOnly) to my table. It would be defined as
CONVERT(Char(10),[DateTimeColumn],101)
I could then search on this in the BrowseDialog as text field by entering my search date in mm/dd/yyyy format. Some problems with this approach are that >, < searches wouldn’t work and the Database Deployment Toolkit does not support computed fields which means I would have to modify the database after deploying it. I would also have to use the database and not DDT in ObjectMapper.
Regardless on whether or not you can fix this in the framework I suggest adding a “Between” for DateTime fields and displaying two DateTimePikcers for beginning and ending dates when selected Most of the time, my users are looking for a specific date or a date that falls within a date range.
-Larry