0
Just mentioning "but notworking" unfortunatelydoesn't explain much about what is happening.
Please give more info, what you are getting, if you are getting error, please give details.
Anythingthat would help us help you better.
0
Hi Simon,
if you want get time difference only that why pass parameters. You can easily with like.
string timespent1 = "SELECT DATEDIFF(minute ,departureTime,entryTime) AS timespent FROM mambo where plateno = '" + TextBox1.Text + "'";
SqlCommand comman = new SqlCommand(timespent1, conn);
conn.open();
string ReturnValue = comman.ExecuteScalar();
check your data in ReturnValue.