title: MYSQL C# get days left query
body: <p>Hello Everyone I am trying to get end_date which is in the format of 2014-01-01</p>
  
  <p>I want to use my subtraction method(which works) with my query of whats in end_date so I can make an if method to see if their subscribtion has payed but I do not know how to make a query  read end_date and compare it to date now</p>
  
  <p>here is my code currently:</p>
  
  <pre><code>string myConnection = "server=****;user=****;database=***;port=3306;password=***;";
                  MySqlConnection myConn = new MySqlConnection(myConnection);
                  MySqlCommand SelectCommand = new MySqlCommand("SELECT end_date FROM username = '" + this.username_txt.Text + "'", myConn);
                  MySqlDataReader myReader;
                  myConn.Open();
                  DateTime endDate = get end_date from query here???;
                  var DaysLeft = (endDate.Date - now.Date).Days;
                  MessageBox.Show(""+ DaysLeft);
  </code></pre>