Firebase Firestore Query Between Two Timestamps

后端 未结 3 1130
温柔的废话
温柔的废话 2021-01-16 12:16

I want to find events that are a on now and upcoming (next 30 days) but that are also not in the past.

When i run this as a cloud function, I get \"Cannot have inequ

3条回答
  •  生来不讨喜
    2021-01-16 12:33

    I know this is kind a old thread, but the answer might be good for others.

    What you can do as I at the end ended up doing, is that you have a $start_date and a $target_date.

    You then do like this:

    where('date.day_start', '>=', $start);
    $query = $query->limit($limit);
    
    ?>
    

    Not bad, eh? You welcome!

提交回复
热议问题