I’m fetch data from this two dates and date format is custom like this dd/MM/yyyy.. both but not show accurate answer between this two dates
Ther is my code :
private void LoadDataGg()
{
LoadDataGridView.DataSource = Getdatlisttt();
}
private DataTable Getdatlisttt()
{
DataTable dt = new DataTable();
string connstring = ConfigurationManager.ConnectionStrings["AppLogin"].ConnectionString;
string cmdstring = "SELECT FROM ClientRecord WHERE DATE1 >='" + DTpickerfrom.Value.ToString("dd/MM/yyyy") + "'
AND DATE1<='" + DTpickerTo.Value.ToString("dd/MM/yyyy") + "' ";
using (OleDbConnection con11 = new OleDbConnection(connstring))
{
using (OleDbCommand cmd11 = new OleDbCommand(cmdstring, con11))
{
con11.Open();
OleDbDataReader reader = cmd11.ExecuteReader();
dt.Load(reader);
con11.Close();
}
}
return dt;
}