function mois(const a:tdate):tdatetime; var LYear,Lmonth, LDay: Word; begin decodedate(a,Lyear,lmonth,lday); if (Lmonth = 12) then result:=EncodeDate(LYear+1,1, LDay) else result:=EncodeDate(LYear,Lmonth+1, LDay);end;
[code=pas]procedure TForm.DBEdit1Exit(Sender: TObject); begin if latable.State in[dsinsert,dsedit] then laTableDateech.AsDateTime:=mois(laTabledateB_C.AsDateTime) end;/code
procedure TForm.DateTimePickerChange(Sender: TObject); begin if latable.State in[dsinsert,dsedit] then begin laTabledateB_C.AsDateTime:=DateTimePicker.date; laTableDateech.AsDateTime:=mois(DateTimePicker.date); end ; end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question