1

I am trying to retrieve some data from MariaDB database to a datagridview in a C# form application. If I am adding a date condition in the query string, it seems like not returning anything. Is it the problem with the date format? Or is it the problem with my query string? Thank you

// selected date is chosen through date time picker
// format is 24/01/2020 10:10:10
selectedDate = dateTimePicker1.Value; 
string query = "SELECT Voltage, Current FROM data_table WHERE device_id='" + Device_ID + "' AND data_date >'"+ selectedDate +"'";

//MariaDB date format is 2020-01-24 09:09:09

master_yoda
  • 463
  • 3
  • 11

0 Answers0