Where condition BETWEEN not working
Where condition BETWEEN not working
BigDataWarehouse
Posts: 23Questions: 10Answers: 0
I'm trying to filter the response by a certain date
the date formal is e.i // 2019/02/26 12:38:17
and here is my Where condition:
var response = new Editor(db, "activities", "id")
.Model<ActivitiesModel1>()
.Where("createdon",(minValue, MaxValue), "BETWEEN")
.Process(request)
.Data();
I get the error
DataTables warning: table id=activities - Operator '==' cannot be applied to operands of type 'System.ValueTuple<System.DateTime,System.DateTime>' and '<null>'
Thanks for your help
This discussion has been closed.
Answers
Anyone struggling with this in the future, one solution would this:
.Where(q => q.Where("createdon", minValue, ">=").AndWhere(r => {
r.Where("createdon", MaxValue, "<=");}))
Cheers!