简体   繁体   中英

How to query the data with selected date range in CloudBoost

我想从特定日期范围的CloudTable获取记录,例如: startDateendDate

We can query all columns including DateTime type in a CloudTable. There are several condition you can add to your query like lessThan, greaterThan etc. In this case, you can use the following query -

var query = new CB.CloudQuery("TableName");
query.lessThan('dateColumns',"15-12-2016");
query.greaterThan('dateColumns',"15-06-2017");
query.find({
  success: function(list) {
    //list is an array of CloudObjects
  },
  error: function(error) {
  }
});

Hope it helps.Happy Coding :)

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM