User will enter a date, for example "7/1/2015". Than I will check in database and return some result if match. Note in database there is data/Time but user will enter only date.
Below I have a following database set up
Table = "workStartTable"
|----|------------------------|
| ID | StartBy |
|----|------------------------|
| 1 | 7/1/2015 2:30:00 PM |
| 2 | 1/22/2013 8:00:00 AM |
| 3 | 10/22/2014 10:25:00 AM |
| 4 | 4/5/2010 5:00:00 PM |
| 5 | 7/3/2015 |
|----|------------------------|
I have created the following query which kind of work. This below query will work becuase there is not time for this record in database.
but "07/01/2015" will not work! this is becuase "07/01/2015" has the time too.
Dim query As String = "SELECT DISTINCT * FROM workStartTable WHERE StartBy = #" & "07/03/2015" & "#;"
Please note I already have tried the following queries and they dont return any result:
Dim query As String = "SELECT DISTINCT * FROM workStartTable WHERE StartBy = " & "07/03/2015" & ";"
Dim query As String = "SELECT DISTINCT * FROM workStartTable WHERE StartBy LIKE % " & "07/03/2015" & " %;"
Dim query As String = "SELECT DISTINCT * FROM workStartTable WHERE StartBy LIKE " & "07/03/2015" & " %;"