I'm doing an Access query in windowsForm I get an error when changing the fixed dates by dateTimePicker how can I make the date the right way, that it works p>
OleDbDataReader read = MSAConnection.read(@"
select
p.cod,
#14/3/2018# as Fecha,
(select count(*)
from Persona p
where not exists( select ma.codPersona
from Control ma
where ma.codPersona = p.codPersona
and ma.fecha = #14/3/2018#)) as Total
from Persona p
where not exists( select ma.codPersona
from Control ma
where ma.codPersona = p.codPersona
and ma.fecha = #" + dateTimePicker + "#)");
while (read.Read())
{
int total = Convert.ToInt32(read["Total"]);
string a = Convert.ToString(read["cod"]);
}