FreeriderUK
Well-known member
I've been struggling with this for a few days, and now have to ask for help.
I am trying to pass a date variable (taken from a DateTimePicker) in a SELECT statement.
The result shows ALL rows instead of > FromDate
Any advice on how to achieve this?
I am trying to pass a date variable (taken from a DateTimePicker) in a SELECT statement.
VB.NET:
Dim FromDate As Date = FromDateDTP.Value
Dim command1 As New SqlCommand
command1.Connection = sqlConn
command1.CommandText = "SELECT * From DateTable WHERE CompletedDate >'" & FromDate & "'"
The result shows ALL rows instead of > FromDate
Any advice on how to achieve this?