here is my query string
SELECT
Payment
,Balance
,PatientNo
FROM
[GP_DB].[dbo].[GP]
where GP.GPDate= (SELECT CONVERT(VARCHAR(24),@GPDate,103))
GPDate is a Date type column, not DateTime
and i pass parameter like this
cmd_select_treatment.Parameters.AddWithValue(
"@GPDate"
,Convert.ToDateTime(dateTimePicker1.Value));
but the following error occur
Conversion failed when converting date and/or time from character string.
@var is DateTime select cast(convert (varchar(8),@var,112) as Date)