19-02-2013, 06:46 PM
هذا هو بداية الطريق
أيضا يمكنك إستخدام هذه الاوامر
PHP كود :
unit Unit1;
interface
uses
DateUtils, // Unit containing the IncYear command
SysUtils,
Forms, Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.dfm} // Include form definitions
procedure TForm1.FormCreate(Sender: TObject);
var
myDate : TDateTime;
begin
// Set up our date to a leap year special day
myDate := EncodeDate(2000, 02, 29);
ShowMessage('myDate = '+DateToStr(myDate));
// Add 2 years to this date
myDate := IncYear(myDate, 2);
ShowMessage('myDate + 2 years = '+DateToStr(myDate));
// Subtract 2 years from this date
myDate := IncYear(myDate, -2);
ShowMessage('myDate - 2 years = '+DateToStr(myDate));
end;
end.
أيضا يمكنك إستخدام هذه الاوامر
PHP كود :
IncDay Increments a TDateTime variable by + or - number of days
IncMinute Increments a TDateTime variable by + or - number of minutes
IncMonth Increments a TDateTime variable by a number of months
IncSecond Increments a TDateTime variable by + or - number of seconds
IncMillisecond Increments a TDateTime variable by + or - number of milliseconds

