copy(yuanshi,1,pos('.',yuanshi)-1))+1;
end
else
result:=strtofloat(yuanshi);
end;
function Tform1.jgjs(shangji:string;xiaji:string;MM:string):string;
var
tt,xiaoshi,fenzhong,allmoney:string;
begin
tt:='';
xiaoshi:='';
fenzhong:='';
allmoney:='';
//tt:=timetostr(now()-strtodatetime(DM.ADOTgltemp.Lookup('卡编号',edit1.Text,'上机时间')));
tt:=timetostr(strtodatetime(xiaji)-strtodatetime(shangji));
xiaoshi:=copy(tt,1,2);
if copy(xiaoshi,2,2)=':' then
xiaoshi:=copy(xiaoshi,1,1);
xiaoshi:=floattostr(strtofloat(xiaoshi)*strtofloat(MM));//小时位的计算
if copy(tt,3,1)=':' then
fenzhong:=copy(tt,4,2)
else
fenzhong:=copy(tt,3,2);
fenzhong:=copy(floattostr(strtofloat(fenzhong)/60*strtofloat(MM)),1,4);// 分钟位的计算