title: C# DateTime format in Arrays
body: <p>Currently my function outputs date as 6/6/2016 and I need to be able to make it as 06/06/2016 for all the data. I found DateTime.Now.ToString("dd") is a solution. But when I do parts[0].DateTime.Now.ToString("dd") it doesn't accept it.</p>
  
  <pre><code>private static string FormatDate(string sDate)
  {
      // "6/16/1989"
      //mysql format 06-16-1989
  
      string[] parts = sDate.Split('/');
  
      //sDay.DateTime.Now.ToString("dd");
  
      return $"'{parts[2]}-{parts[1]}-{parts[0]}'";
  }
  </code></pre>