title: How can we sort Firebase Firestore data by TimeStamp dataType using Angular?
body: <p>I am having Ticket Posting Web App, and i would show only those tickets which are active and with-in 24 hours records(from now on).</p>
  
  <p>I am using <strong>Firebase Cloud Firestore</strong> with <strong>Angular 7</strong>. </p>
  
  <pre><code> getTicketList(){
   this.ticketData = 
   this.fireStore.collection('ticket').doc("paid").collection("ticket-list", 
   ref =&gt;
   ref.where('status', '==', 
    "active").where("paid","==","false").orderBy("myTimeStamp");
   return this.ticketData.snapshotChanges() ;
   }
  </code></pre>
  
  <p>We are having a a key "myTimestamp" which is <strong>Firestore Timestamp</strong> Type. </p>
  
  <p>want to show only those records which are active and currently having a time remaining to book. </p>
  
  <p>Beow i mentioned the codes which i am using to get from Firebase service.</p>
  
  <pre><code> this.firestore.getTicketList().subscribe(list =&gt; {
    this.ticketList = list.map(item =&gt; {
      return { id:item.payload.doc.id,
        ...item.payload.doc.data()}
    })
    console.log(this.ticketList);
  });
  </code></pre>
  
  <p>Thanks </p>
  
  <p>Edited </p>
  
  <p><a href="https://i.stack.imgur.com/1rDIz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1rDIz.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/5u2FT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5u2FT.png" alt="enter image description here"></a></p>