How do I get the value that is in the datepicker and do a search in the database? I tried this way but this is not correct
var cmd = new MySqlCommand("SELECT distinct id, Pedagio, Carro, Placa, Fabricante, Ano, Cor, Data FROM tcc WHERE Data = '" + txtDate.Date + "'", _connection);
It was without the name I put it now, but it still does not take action.
<DatePicker x:Name="txtDate" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="0,208,0,0" VerticalAlignment="Top" Width="415">