المشاركات : 111
المواضيع 37
:
: 0
الإنتساب : Mar 2013
السلام عليكم اخواني
كيف يتم تحويل الوقت الى عدد صحيح
00:01:40 و في العدد الصحيح يصبح 100 اي (100) ثانيه
و بارك الله في الجميع
المشاركات : 654
المواضيع 82
:
: 57
الإنتساب : Mar 2011
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;
وللتحويل الساعات * 3600 + الدقائق * 60 + الثواني
او
PHP كود :
ShowMessage(TimeToStr(Time));
ShowMessage(IntToStr(Trunc((Time) * 86400)));
المشاركات : 111
المواضيع 37
:
: 0
الإنتساب : Mar 2013
بارك الله فيك و ليجعله في ميزان حسنتك
شكرا جزيلا