title: insert date into SQL
body: <p>I'm trying to insert a date into a SQL table, but it when the program runs it gives the following error.</p>
  
  <blockquote>
    <p>Conversion failed when converting date and/or time from character string.</p>
  </blockquote>
  
  <pre><code>string dateReleased = DateReleasedDate.Value.ToString("YYYY-MM-DD");
  
  string myQuery = "INSERT INTO GameTbl (gameName, genreID, players, online, dateReleased, dateAdded, developerID, publisherID, consoleID) VALUES('" 
                  + GameNameTxt.Text + "', '" + GenreCombo.SelectedValue + "', '" + PlayersNUD.Value + "', '" + OnlineCombo.SelectedText + "', '"
                  + dateReleased  + "', 'GETDATE()', '" + DeveloperCombo.SelectedValue + "', '" 
                  + PublisherCombo.SelectedValue + "','" + ConsoleCombo.SelectedValue + "')";
  </code></pre>