If you need to get records of today, change the SQL as below. Note that I have removed taking date from label, SQL
GETDATE
function can be used to get the current date. we don't need to send it from UI.
SELECT queueno, plateno, CONVERT(varchar(10), qdate, 101) AS DateToday FROM dbo.TRN_Queue WHERE CAST(qdate AS DATE) = CAST(GETDATE() AS DATE)
Or you need to get records for given date, use SQL parameter
SELECT queueno, plateno, CONVERT(varchar(10), qdate, 101) AS DateToday FROM dbo.TRN_Queue WHERE CAST(qdate AS DATE) = CAST(@dateParam AS DATE)
then you need to set the value of parameter as below
cmd.Parameters.Add("@dateParam", SqlDbTypes.DateTime).Value = DateTime.Now