Procedure tform1.formcreate (Sender: tobject); // form Initialization
VaR
Ifilehandle: integer;
Filetime: tdatetime;
Days: integer;
Hours: integer;
Minutes: integer;
Seconds: integer;
Begin
Datapath: = extractfilepath (paramstr (0) + 'data ';
If fileexists(datapath+'local.rar ') then
Begin
Ifilehandle: Export fileopen(datapathsf-'localdatabase.rar ', fmopenread );
Filetime: = filedatetodatetime (filegetdate (ifilehandle ));
Fileclose (ifilehandle );
Days: = daysbetween (now, filetime );
Hours: = hoursbetween (now, filetime)-(days * 24 );
Minutes: = minutesbetween (now, filetime)-(days * 24 + hours) * 60 );
Seconds: = secondsbetween (now, filetime)-(days * 24 + hours) * 60 + minutes) * 60 );
Label1.caption: = 'last modification time: '+
Inttostr (days) + 'day' +
Inttostr (hours) + 'hour '+
Inttostr (minutes) + 'quantity' +
Inttostr (seconds) + 'Seconds EARLIER ';
End;
End;