Reputation: 533
How to check the sequence of date in loopback query. I tried in 2016-05-24,2016-05-25 and '2016-05-24','2016-05-25' it is not worked but while going for one date it works fine. Can any one help me to fix this issue.
allDays = 2016-05-24,2016-05-25; or
allDays = '2016-05-24','2016-05-25';
LeaveLedger.find({
where : {
and : [{
date : {inq : [allDays]},
party_id : party_id,
status : {nin : [rejectedId, canclledId]}
}]
}
}
Upvotes: 0
Views: 801
Reputation: 533
Got the answer,
Problem is allDay is in string instead of that I used array to check in loop back.
allDays = ['2016-05-24','2016-05-25'];
LeaveLedger.find({
where : {
and : [{
date : {inq : allDays},
party_id : party_id,
status : {nin : [rejectedId, canclledId]}
}]
}
}
Upvotes: 1