Subsonic 3.0 select Query using DateColumn

Posted by vineth on Stack Overflow See other posts from Stack Overflow or by vineth
Published on 2010-04-26T13:00:11Z Indexed on 2010/04/26 13:03 UTC
Read the original article Hit count: 203

Filed under:
|

Hi ,

While selecting records using Date-Field i am facing a problem ,

my SQL2005 View (ViewOrders) StarDate column Have

4/23/2010 12:00:00 AM 4/23/2010 12:00:00 AM 4/23/2010 12:00:00 AM 4/23/2010 12:00:00 AM 4/23/2010 1:07:00 PM

My Code using subsonic 3.0

AMDB ctx = new AMDB(); SqlQuery vwOrd = ctx.Select.From();
vwOrd = vwOrd.And("StartDate").IsGreaterThanOrEqualTo("04/22/2010");//From date vwOrd = vwOrd.And("StartDate").IsLessThanOrEqualTo("04/22/2010");// To Date List cat = vwOrd.ToList();

i can able to fetch only first four records, i can't able to fetch the final record which start date contains(4/23/2010 1:07:00 PM). I think the problem is in the time format..

How can i code in subsonic ,which compare only the date in the date-time column.

I Don't need date "Between" method in subsonic, since i can get single date parameter(From date alone).

how can i solve this problem.

Thnks in advance

© Stack Overflow or respective owner

Related posts about subsonic3

Related posts about c#