shosho shosho

shosho shosho

  • NA
  • 56
  • 18.9k

SQL Select Statement

May 11 2015 10:22 AM

how to read the records from database that have today's date using select statement.
I have tried doing this:


    DateTime todaysDate = DateTime.Now;

    string qr = String.Format(" SELECT tbl_Student.StudentName AS Name
FROM tbl_StudentTrack 
LEFT JOIN tbl_Student ON tbl_Student .Id=tbl_StudentTrack .StudentId
WHERE UserId = {0} ", userID, todaysDate);


But this doesnt seem to work, it just displays all the records.



Answers (2)