title: Sorting events according to date in Firebase
body: <p>I have news data in Firebase in following format:</p>
  
  <p><a href="https://i.stack.imgur.com/9jt6p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9jt6p.png" alt="enter image description here"></a></p>
  
  <p>I want to sort it according to date (<code>newsDate</code>) in descending order (latest on the top). I have added this to my code while I am retrieving data from Firebase: </p>
  
  <p><code>databaseReference.orderByChild("newsDate").addChildEventListener(new ChildEventListener() { 
  // on child added methods 
  }</code></p>
  
  <p>But this only does string sorting, so that order becomes like this: <em>04/08/2018 12:00</em>, <em>13/08/2018 10:30</em>, <em>30/07/2018 00:00</em></p>
  
  <p>I know this is because of alphabetical sorting. Wondering how I can customize sorting order with my date format (<strong>dd/mm/yyyy hh:mm</strong>) and also in descending order?</p>