Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

299
Visualizações
how to query docs in firestore based on the date you chose in firestore V9

i want to fetch the docs based on a date im inputing , and these docs have their timestamp in docs data , i tried querying with where() but still not working or maybe im not doing in the right way

im getting the date from this library



  const showDatePicker = () => {
    setDatePickerVisibility(true);
  };

  const hideDatePicker = () => {
    setDatePickerVisibility(false);
  };

  const handleConfirm = (date) => {
    setDate(date);
    hideDatePicker();
  };
 <Button title="Show Date Picker" onPress={showDatePicker} />
      <DateTimePickerModal
        isVisible={isDatePickerVisible}
        mode="date"
        onConfirm={handleConfirm}
        onCancel={hideDatePicker}
      />

And this is my query

  const finishedRef = collection(db, "validatedOrders");
     const finishedQ = query(
       finishedRef,
       where("status", "==", "Delivered"),
       where("date", "==")
     );
const finishedSnapshot = await getDocs(finishedQ);
     finishedSnapshot.forEach((doc) => {
       finished.push(doc.id);
     });


about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If the date fields in your database have Timestamp values, you'll need to use add both >= and < conditions on that field for the range of timestamps for the date values you want returns.

See for an example of this: Firestore Cloud Function query by DATE and Firestore query by date range

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda