仅时间查询mongoDB

时间:2019-04-20 14:51:15

标签: java mongodb spring-boot

我将时间作为字符串在MongoDB中存储为“ HH:MM”。

现在我想查询时间范围,即获取11:30到22:10之间的所有文档

{
    "_id" : "DV00300029",

    "address" : {
        "lineAddress1" : "Address line 1",
        "lineAddress2" : "Address line 2",
        "lineAddress3" : "Address line 3",
        "pinCode" : 560038,
        "city" : "Bangalore",
        "state" : "Karnataka"
    },
   "pickUpCutOff" : "23:00"
}

我想查询pickUpCutOff

0 个答案:

没有答案