Access SQL tends to be rather flexible when accepting Date/Time values as strings. However, since you really should be using a parameterized query anyway because
- they're safer (by avoiding SQL Injection issues),
- you don't have to mess with delimiters for date and text values,
- you don't have to worry about escaping quotes within text values, and
- they handle dates properly so your code doesn't mangle dates on machines set to
dd-mm-yyyy format,
consider using the following approach
this.query = "UPDATE [Attendance] SET [TimeOut]=? WHERE [Emp_Id]=? AND [Date]=?";
cmd.CommandText = this.query;
cmd.Parameters.AddWithValue("?", DateTime.Now.ToString("H:mm:ss"));
cmd.Parameters.AddWithValue("?", txtEmpId.Text);
cmd.Parameters.AddWithValue("?", this.Date);
cmd.ExecuteNonQuery();
#signs? Look into using parameterized queries. This might help: stackoverflow.com/questions/20242896/… - sgeddes