26-12-2008, 12:28 PM
اليوم اخر يوم للتمرين
وهذا حلي
PHP كود :
var
m,y: word;
d1,d2 : TDateTime;
begin
DateSeparator:='/';
ShortDateFormat:='DD/MM/YYYY';
m:= ComboBox1.ItemIndex + 1; if m=0 then Exit;
y := 2008;
d1:=EncodeDate(y,m,1);
if m=12 then d2:=EncodeDate(Y+1,1,1) else
d2:=EncodeDate(Y,M+1,1);
d2 := d2 -1 ;
Table1.Filter := '(Date>='+QuotedStr(DateToStr(d1))+') and (Date<='+QuotedStr(DateToStr(d2))+')';
Table1.Filtered := True;
end;
ملاحظة أول تعليمتين من المفترض وضعهما في الحدث OnCreate للForm الرئيسية لاننا نحتاج تنفيذهما مرة فقط
والسلام عليكم

