I have class name ("RHospital") and I search in column ("appointDate") for a list of the dates , but what I get is the Full ParseObject because I write in the query Method ParseObject , However I want only the date in ("appointDate") so How can I retrieve it ?
my problem is that I don't know how to do search of list of specific data in Parse class this is a screen shot of the data in parse
and this is mycode
Calendar cal = Calendar.getInstance();
cal.set(2015, 8, 12, 0, 0, 0);
Calendar sswal = Calendar.getInstance();
sswal.set(2015, 8, 12, 23, 30, 0);
Date dd = cal.getTime();
Date mok =sswal.getTime();
final ParseObject[] most = new ParseObject[15];
Date moste[]=new Date[15];
ParseQuery<ParseObject> query = ParseQuery.getQuery("RHospital");
query.selectKeys(Arrays.asList("appointDate"));
query.whereGreaterThanOrEqualTo("appointDate", dd);
query.whereLessThanOrEqualTo("appointDate", mok);
query.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> list, com.parse.ParseException e) {
if (list == null) {
Log.d("score", "The getFirst request failed.");
} else {
mStatus = list;
for (ParseObject Dated: list){
post =Dated.getParseObject("appointDate");
Log.d("appointDate", "retrieved a related date");
}
}
}
});
Thank you in advance
使用它来获取日期:
Date post =Dated.getDate("appointDate");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.