05-03-2013, 07:22 AM
05-03-2013, 07:45 AM
PHP كود :
unit Unit1;
interface
uses
SysUtils, // Unit containing the DecodeTime command
DateUtils,
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;
myHour, myMin, mySec, myMilli : Word;
begin
// Set up the myDate variable to have a December 2000 value
myDate := StrToDateTime('29/12/2000 12:45:12.34');
// Now add 5 minutes to this value
myDate := IncMinute(myDate, 5);
// And let us see what we get
DecodeTime(myDate, myHour, myMin, mySec, myMilli);
ShowMessage('Time now = '+TimeToStr(myDate));
ShowMessage('Hour = '+IntToStr(myHour));
ShowMessage('Minute = '+IntToStr(myMin));
ShowMessage('Second = '+IntToStr(mySec));
ShowMessage('MilliSec = '+IntToStr(myMilli));
end;
او
PHP كود :
ShowMessage(TimeToStr(Time));
ShowMessage(IntToStr(Trunc((Time) * 86400)));
05-03-2013, 08:01 AM
بارك الله فيك و ليجعله في ميزان حسنتك
شكرا جزيلا
شكرا جزيلا