What is wrong with this sql statement?

Posted by chandru_cp on Stack Overflow See other posts from Stack Overflow or by chandru_cp
Published on 2010-05-12T17:44:54Z Indexed on 2010/05/12 17:54 UTC
Read the original article Hit count: 112

Filed under:
|
|
|

I am trying to fetch records based on two dates from sql server... Select * from table where CreatedDate between @StartDate and @EndDate and i pass 5/12/2010 and 5/12/2010 (ie) fetching records for today... I have 17 records dated 5/12/2010 but none seems to get selected....

EDIT: I use this but when i debug my value it shows 5/12/2010 12:00:00AM

    DateTime baseDate = DateTime.Today;
    var today = baseDate;
    GetBookingReportByDate(today,today);

© Stack Overflow or respective owner

Related posts about sql-server-2005

Related posts about select