I'm using datetimepicker to choose the date to show the data from the microsoft sql server but the cells are empty.
I use LIKE
operator to show the purchased item within the day.
This is the code:
Public Sub see4()
'MYPOPUL4TE D4T4GRIDVIEW3
Dim query As String = "SELECT * FROM projectsd.dbo.cart WHERE dates LIKE '" & DateTimePicker1.Text & "'"
Using cmd As SqlCommand = New SqlCommand(query, con)
Using da As New SqlDataAdapter
da.SelectCommand = cmd
Using dt As New DataTable()
da.Fill(dt)
DataGridView3.DataSource = dt
End Using
End Using
End Using
End Sub