【问题标题】:How to query data from the last 7 days(week) on parse如何在解析时查询过去 7 天(周)的数据
【发布时间】:2015-06-30 23:01:58
【问题描述】:

我正在尝试在解析时查询过去 7 天(周)的数据。我怎么能那样做。我一直在研究很多文章/论坛,但它们似乎都已经过时了。

【问题讨论】:

  • 请给我们一个你需要查询的数据和你的查询类样式的例子

标签: ios objective-c parse-platform pfquery


【解决方案1】:

你会使用类似的东西:

NSDate *date = [NSDate dateWithTimeIntervalSinceNow:604800];
[query whereKey:@"createdAt" lessThan:date];

其中 604800 是一周中的秒数。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多