eduardo12fox
asked on
How get data after string
Hello guys,
I have a procedure and I need get part of string.
In variable CaminhoPasta I need get all after 'C:\FlexByouERP\Anexos\'
how do that?
I have a procedure and I need get part of string.
procedure TEMPRESA.btn1Click(Sender: TObject);
var
ArquivoOrigem: TFileStream;
ConteudoBase64: TStringStream;
Arquivo64EmString: String;
MyFilesExtension:string;
CaminhoPasta:string;
Dia:string;
Mes:string;
Ano:string;
Hora:string;
Minuto:string;
segundo:string;
NomeLiteralImagem:string;
begin
Dia := FormatDateTime('dd', Date );
Mes := FormatDateTime('mm', Date );
Ano := FormatDateTime('yyyy', Date );
Hora := FormatDateTime('hh',now);
Minuto := FormatDateTime('nn',now);
segundo := FormatDateTime('ss',now);
if Length(EdtOrigem.Text) > 0 then
begin
CaminhoPasta := 'C:\FlexByouERP\Anexos\'+Dia+Mes+Ano+Hora+Minuto+segundo;
In variable CaminhoPasta I need get all after 'C:\FlexByouERP\Anexos\'
how do that?
Thats going from london to paris via new york.
You'll get there, but it will take 2 days.
For sorting it's better to use year,month,day like rgonzo1971 suggests
You'll get there, but it will take 2 days.
For sorting it's better to use year,month,day like rgonzo1971 suggests
ASKER
Sorry, I did not know how to explain. I not get nothing about date. I need get data after the phrase 'C:\FlexByouERP\Anexos\'
in PHP for example exists a function substr
$variable = substr(CaminhoPasta,0,infi nity);
retult = 100920171232
this option show me exactly that I need but this is in PHP I need in delphi.
in PHP for example exists a function substr
$variable = substr(CaminhoPasta,0,infi
retult = 100920171232
this option show me exactly that I need but this is in PHP I need in delphi.
Maybe
Result := LeftStr(CaminhoPasta , length(CaminhoPasta)-16);
ASKER
almost that Rgonzo1971
Now I get "C:\FlexByouERP\Anexos\"
I want get other part.
This "C:\FlexByouERP\Anexos\" I not get this I want after that sentence
Now I get "C:\FlexByouERP\Anexos\"
I want get other part.
This "C:\FlexByouERP\Anexos\" I not get this I want after that sentence
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes!! Congratularion... Thaks!!!
why don't you use
Open in new window
I would recommendOpen in new window
Regards