I have the following digitable line of a ticket, I need a function to extract the expiration date of it, and then use it in others.
Fingerprint: 74893.12004.21627.007186.37931.981056 1 59490000041480
I know that 5949
is the ticket expiration, but I can not convert to a Date. I mounted the following function but it did not work:
function ExtrairDataVencimento(const CodigoBarras: String): TDateTime;
begin
Result := StrToDate('07/10/1997') + StrToInt(Copy(CodigoBarras, 34, 4));
WriteLn(Result);
end;
Any suggestions?