c# - Select data from Specific dates -


i using ms access database , c# front end. want fetch data specific date of month , year. got result 2 digit dates(10,11,12.....) not single digit(01,02,03,.......,09)

here code

string d = datetimepicker1.value.date.tostring("dd"); string constr = @"provider=microsoft.ace.oledb.12.0;data source=|datadirectory|\auto_finance.accdb;persist security info=false;"; oledbconnection con = new oledbconnection(constr); con.open(); //string sql1 = @"select * party_det order pname asc loandate '%'" + d + "'%' order pname asc "; //string sql1 = @"select * party_det order pname asc loandate '*',@loandate";// order pname asc "; //string sql1 = @"select * party_det loandate '*',@loandate";// order pname asc "; string sql1 = @"select * party_det day(loandate)=@loandate order pname asc "; oledbcommand cmd1 = new oledbcommand(sql1, con); cmd1.parameters.addwithvalue("@loandate", d); oledbdataadapter da = new oledbdataadapter(cmd1); datatable dt = new datatable(); da.fill(dt); datagridview1.datasource = dt; con.close(); 

thank you

if understood question correctly, can this:

string sql1 = @"select * party_det day(loandate)=@loandate order pname asc ";