I have the below function to get result from SQlite Database with condition to select result between Start and End Date.
The strCurrentDate for the function is in "mm/dd/yyyy" example : 12/23/2103
the table : itemSales has DateTime field for Start and End Date
The problem:
How to create the Select statement for Between Start Date and End Date for SQLite?
private async void GetActualPrice(string Cpy, string No, string strCurrentDate,string strSelectedUoM)
{
var db = new SQLiteAsyncConnection(dbPath);
var Items = await db.Table <ItemSales>().Where(x => x.CompanyName == Cpy && x.ItemNo == No &&
//-- how to compare the dates : Start and End Date against the table ItemSales ??
strCurrentDate => x.StarDate && strCurrentDate <= x.EndDate).ToListAsync();
foreach (var _line in Items)
{
}
}
Thanks