title: How can I read a text file of dates and convert them into an array that I can sort in C#?
body: <p>I have a text file of dates that appear like this:</p>
  
  <pre><code>16/02/2015
  13/02/2015
  12/02/2015
  11/02/2015
  10/02/2015
  09/02/2015
  </code></pre>
  
  <p>and so on.</p>
  
  <p>How can I convert this into something that I can use in a quick sort for example?
  I am already reading the text file like this</p>
  
  <pre><code>string[] Date = System.IO.File.ReadAllLines("Date.txt");
  </code></pre>
  
  <p>I've tried using something like this:</p>
  
  <pre><code>double[] Dates = Array.ConvertAll(Date, s =&gt; DateTime.Parse(s));
  </code></pre>
  
  <p>And this just doesn't work.</p>
  
  <p>My desired output after being put through my algorithm is to have them in order but outputting the same format as I have showed previously.</p>
  
  <p>Any advice would be greatly appreciated. Thanks for reading.</p>
  
  <h1>EDIT</h1>
  
  <p>So I have managed to get the dates outputting in the way that I desire using this method:</p>
  
  <pre><code>string[] Date = System.IO.File.ReadAllLines("Date.txt");
  DateTime[] Dates = Array.ConvertAll(Date, s =&gt; DateTime.Parse(s));
  </code></pre>
  
  <p>However, it is also outputting a time.</p>
  
  <pre><code>19/01/2014 00:00:00
  </code></pre>
  
  <p>How can I get rid of this?</p>
  
  <p>Thanks again, guys!</p>