...den letzten Tag vom aktuellen Monat ermitteln?
Autor: Fred
function LastDayOfCurrentMonth: TDate;
var
y, m, d: Word;
begin
DecodeDate(now, y, m, d);
m := m + 1;
if m 12 then
begin
y := y + 1;
m := 1;
end;
Result := EncodeDate(y, m, 1) - 1;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(DateToStr(LastDayOfCurrentMonth));
end;
printed from
www.swissdelphicenter.ch
developers knowledge base