Arsip: ambil char dari 2 tipedata

 
user image
more 16 years ago

nurez

hii all, mw tanya nech... gimana yha klu mau ambil 2 digit dari suatu record ex : ABG215577 klo 55= cakeb ABGD710304 klo 03= caem mau mengambil 2 char (55 / 03 atau digit ke dua dari numeric) itu gmn yha..? mohon bantoannya yha... makasihh
user image
more 16 years ago

DelphiExpert

diriku ngga' mudheng... pas lagi gendheng... xixix :mrgreen:
user image
more 16 years ago

pebbie

pakai Copy atau Pos?
user image
more 16 years ago

ImanD

idem ga mudeng, mudah2an bener data yg diambil selalu mulai 4 dari belakang diambil 2 karakter, kakkaka

uses
  StrUtils;
begin
  MidStr(data,Length(data)-4+1,2);
end;
klo dah dape trus compare am field yg ada keterangan cakeb caem atw apalah.... bingung, kakakkakaka
user image
more 16 years ago

nurez

klo 3 char dari belakang/depan.. bisa diatasi ... tp ini dari tipedata text dimulai penghitungannya ex: ABG010203 dimulai 0102 = csakeb ABGH010203 dimulai 0102 = caemz ABGJ010303 dimulai 0103 =cager ABO010203 dimulai 0102 = std BB0101100 dimulai 0101 =bencos maunya di ambil dari char numeric..itu gmn boss..? shingga dihasilkan : ABG010203 = csakeb ABO010203 = std BB0101100 = bencos pLLzz omm2...
user image
more 16 years ago

ImanD

sample simple u/ pengambilan 4karakter di depan

function ambilangka(param: string): string;
var
  i: byte;
begin
  Result:=UpperCase(param);
  for i:=1 to 26 do
    result:=StringReplace(result, Chr (64+i), '',[rfReplaceAll, rfIgnoreCase]);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
  asal: string;
begin
  asal:='BB0101100';
  Edit1.Text:=Copy(ambilangka(title),1,4);  //atw LeftStr(ambilangka(title),4)
end;
lakukan perbandingan dengan csakeb, std,bencos atw apalah itu....... klo var asal ngambil dari database tinggal di loop az
user image
more 16 years ago

nurez

NABILA SHAKEB... KANG IMAND EMANG KASEB.. :D tp blum dicoba :D heehe
user image
more 16 years ago

ImanD

@nurez: NABILA SHAKEB... KANG IMAND EMANG KASEB.. :D tp blum dicoba :D heehe
apaan tuh ga ngerti, coba az mudah2an membantu
more ...
  • Pages:
  • 1
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com