when am passing like this am getting output correctly
string st = "Select attandence.ID,lastname from student,attandence WHERE attandence.inouttime = '5/18/2012' and attandence.id=student.id and attandence.inout=1";
but when am passing the date as a string or datetime format am not getting the any output
string dt = dateTimePicker1.Value.ToShortDateString();
string st = "Select attandence.ID,lastname from student,attandence WHERE attandence.inouttime = " + dt.ToString() + " and attandence.id=student.id and attandence.inout=1";
i also tried dt only at the place of dt.ToString() but am not getting
in my msaccess file i tested the date field with both text and date time.
But not get the output
please help me
Loading
znaneswar kodavantiPosted May 18, 2012, 6:56 AM
VulpesPosted May 18, 2012, 6:51 AM
string st = "Select attandence.ID,lastname from student,attandence WHERE attandence.inouttime = #" + dt.ToString() + "# and attandence.id=student.id and attandence.inout=1";