Subsonic 3.0 select Query using DateColumn
- by vineth
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