function DateTimeDecYear(
const DateTime: TDateTime; N: Word): TDateTime;
var
Year, Month, Day: Word;
Hour, Min, Sec, MSec: Word;
begin
DecodeDate(DateTime, Year, Month, Day);
DecodeTime(DateTime, Hour, Min, Sec, MSec);
Dec(Year, N);
Result := EncodeDate(Year, Month, Day) + EncodeTime(Hour, Min, Sec, MSec);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(DateTimeToStr(DateTimeDecYear(Now, 100)));
end;