Query by date returning error vb.net

Database
Enthusiast

Query by date returning error vb.net

I'm trying to run a query from a search form by date and I'm receiving the following error: [Teradata Database] Partial string matching requires character operands.

The code for the search is:

ElseIf OptDate.Checked = True Then
sSQL &= "DATE_SUBMIT Like ('" & txtDateRec1.Text & "%')"
End If

and yes - the data type for the column is "date".
1 REPLY
Enthusiast

Re: Query by date returning error vb.net

Sorry this is the correct SQL

sSQL &= "DATE_SUBMIT = ('" & txtDateRec.Text & "')"