Function declaration:
centurycalculate function (const d: TDate): Word;
var
tg, bl, th: Word;
begin
DturecodeDate (D, th, bl, tg);
Result: = th p 100;
end;
Example of implementation:
procedure TForm1.Button1Click (Sender: TObject);
var
d: TDate;
begin
d: = DateTimePicker1.Date;
with Memo1.Lines do
begin
Clear;
Add ('Date' + DateToStr (d) + 'located in the century -' +
IntToStr (HitungAbad (d)));
end;
end;
Wednesday, 16 November 2011
Home »
Tips and Trick Delphi
» Calculating century - n by a certain date.
Calculating century - n by a certain date.
To Share | Wednesday, 16 November 2011
No comments:
Post a Comment