Hi,
I'm trying to convert the timebetween into a decimal, so i can calculate salary.
`var
TLogIn: TextFile;
sLine, sTIn, sTOut,sUser,sTimeOut,sTimeIn,YourHMStr: string;
iPosHash, iPosComma, iLength, iTimeIn,iTOut, iWage,iTimeOut:integer;
TimeOut,dtDiff,TimeIn:TTime;
rTime: real;
d1, d2 : TDatetime;
Begin
//d2 := StrToTime(time());
TimeOut:= Time();
AssignFile(TLogIn,'LogInTime.txt');
reset(TLogIn);
while NOT eof(TLogIn) do
begin
Readln(TLogIn,sLine);
iPosHash:= Pos('#',sLine);
iPosComma:= Pos(',',sLine);
iLength:= Length(sLine);
sUser:= Copy(sLine,1,iPosHash-1);
sTimeIn:= Copy(sLine,iPosHash+1,iLength-3);
TimeIn:= StrToTime(sTimeIn);
ShowMessage(TimeToStr(TimeIn-d2));
// iWage := HoursBetween(TimeOut,iTimeIn);
dtDiff:= TimeOut- TimeIn;
// rTime:= "Gen"
lblWage.Caption:= TimeToStr(dtDiff);
end;
end;`
i have stored the log in time in textfile. and im planning on multipying every hours by 180. Can you please help