I’m trying to compare some dates for a ParseQuery.
It doesn’t give me errors but it just doesn’t filter the dates.
Here’s some code:
if(dateFrom!=null){
query.whereLessThanOrEqualTo("from", dateFrom);
}
if(dateTo!=null){
query.whereGreaterThanOrEqualTo("to", dateTo);
}
date is java.util.Date (not sql)
Date dateFrom = new Date(fromYear,fromMonth,fromDay,fromHour,fromMinute);
Date dateTo = new Date(toYear,toMonth,toDay,toHour,toMinute);
when I look at my ParseObjects on parse.com, I see the objects got a dateFrom and dateTo.
Can somebody tell me why it doesn’t filter?
Thank you
I’ve tested that Date Comparisons work with the Javascript SDK.
(word is a basic parse model)
As a workaround you could always transfer your days into seconds like Date.getTime() and use integers for the comparison.
regards