title: SQL Text column holds a date. How to convert to get actual date from the text?
body: <p>Here is my code and my problem.  When i run the SQL Query it is showing (for current month i'm writing this) not only this current year but also the previous (2018) year and I assume there is a problem with the way i'm converting the dates?  Any help would be appreciated.</p>
  
  <pre><code>    &lt;?
  $fdaymonth = (new DateTime('first day of this month'))-&gt;format('m/d/Y');
  $ldaymonth = (new DateTime('last day of this month'))-&gt;format('m/d/Y');
  $currmonthname = Date('F');
  ?&gt;
  &lt;hr /&gt;
  &lt;p class="pull-left txt-color-blueLight"&gt;Marked in system as sold in &lt;?=$currmonthname;?&gt;: 
  &lt;?   
  $query = "SELECT source,count(*) as total
  FROM apps
  WHERE date_sold BETWEEN '" . $fdaymonth . "' and '" . $ldaymonth . "'";
  
  $result = mysqli_query($conn,$query) or die(mysqli_error($conn));
                      if (mysqli_num_rows($result)== 0) echo "&lt;strong&gt;Error&lt;/strong&gt;"; 
  
                      // Print out result
                      while($row = mysqli_fetch_array($result)){
  
      echo "&lt;b class=\"badge bg-color-greenLight\"&gt;" . $row['total'] . "&lt;/b&gt;";
  }
  ?&gt;
  &lt;/p&gt;
  </code></pre>