Delphi 7 kunlar saralash

+1 ovoz
51 marta ko‘rilgan
so‘radi 04 dekabr, 17 Farrux (75 bal)
tahrirlandi 15 dekabr, 17 Saidolim

Malumotlarni 01/11/2017 dan 30/11/2017 gacha saralaydigan isxodnik kod kerak edi delphi ta adoquery dan

form8.ADOQuery1.Active := false;
form8.ADOQuery1.SQL.Clear;
form8.ADOQuery1.SQL.Add('SELECT *');
form8.ADOQuery1.SQL.Add('FROM Table_1');
form8.ADOQuery1.SQL.Add('WHERE data >=#' + datetostr (form7.DateTimePicker1.Date)+'#');
form8.ADOQuery1.SQL.Add('and data <=#' + datetostr(form7.DateTimePicker2.Date)+'#');
form8.ADOQuery1.Active:=true; 

shu kodni yozsam bo'lmayapti

izoh qoldirdi 04 dekabr, 17 Saidolim (2,915 bal)
oldin o`ziz yozib ko`rgan koddan bitta frangment tashlang. keyin yordam berish oson bo`ladi.
izoh qoldirdi 08 dekabr, 17 Farrux (75 bal)
ADOQuery1.Parameters.ParamByName('prmDate1').Value:= DateTimePicker1.ADOQuery1.Parameters.ParamByName('prmDate2').Value:= DateTimePicker2.Date;  2 sana oralig'idagi malumotlarni yig'ish
izoh qoldirdi 08 dekabr, 17 Farrux (75 bal)
form8.ADOQuery1.Active := false;
form8.ADOQuery1.SQL.Clear;
form8.ADOQuery1.SQL.Add('SELECT *');
form8.ADOQuery1.SQL.Add('FROM Table_1');
form8.ADOQuery1.SQL.Add('WHERE data >=#' + datetostr (form7.DateTimePicker1.Date)+'#');
form8.ADOQuery1.SQL.Add('and data <=#' + datetostr(form7.DateTimePicker2.Date)+'#');
form8.ADOQuery1.Active:=true;                    shu kodni yozsam bo'lmayapti

1 ta javob

0 ovoz
javob berdi 18 dekabr, 17 m.kholmirzaev (115 bal)
SqlQuey:= "select * from table_1 where date1 >=#" + form7.DateTimePicker1.Date + "# and date2 <=#" + form7.DateTimePicker2.Date + "#";
form8.ADOQuery.SQL.Clear;
form8.ADOQuery.SQL.Add(SqlQuery);

Assalomu alaykum, yordam.uz saytimizga xush kelibsiz.

Bu saytda o`zingizni qiziqtirgan savollarga javob olishingiz va o`z sohangiz bo`yicha savollarga javob berishingiz mumkin.

Bizning Oilamizga a'zo bo`lganingiz uchun chuqur Minnatdorchilik bildiramiz !!!

Telegram kanal YordamUzRss

...