我正在尝试使用PFQuery搜索包含特定日期(没有时间)的所有结果。我似乎无法弄清楚它为什么不起作用。我使用的代码如下。按日期排列的PFQuery
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"YYY-MM-dd"];
NSString *today;
today = [dateFormat stringFromDate:[NSDate date]];
PFQuery *query = [PFQuery queryWithClassName:@"Booking"];
[query whereKey:@"nextAppointment" equalTo:today];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error) { etc etc...
将字段nextAppointment设置为使用Parse网站的日期。 任何帮助,将不胜感激
你是什么意思说“nextAppointment被设置为一个日期”? – Seryozha