FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Character to convert in decimal
Posts: 5
Joined: Fri Jun 08, 2007 12:32 PM
Character to convert in decimal
Posted: Fri Oct 09, 2015 11:14 AM

Hi Antonio,
I have a big problem to convert a character field n5 char(20,0) to a dezimal field betrag(N,12,2)
I get the characterfield with csv conversion from bank.
-23,58 field n5
or
+11.931,76 field n5
with the code
betrag = val(n5)
the result is
-23.00 and not -23.58 or -23,58
the problem is, that there are no decimals.
Please can you give me here some examples for conversion.
Thank you
Best regards Armin

Thanks Armin
Posts: 137
Joined: Mon Oct 22, 2012 04:43 PM
Re: Character to convert in decimal
Posted: Fri Oct 09, 2015 11:48 AM
Code (fw): Select all Collapse
  betrag = val(strtran(strtran(n5,".",""),",","." ))
Regards



Ing. Anton Lerchster
Posts: 5
Joined: Fri Jun 08, 2007 12:32 PM
Re: Character to convert in decimal
Posted: Fri Oct 09, 2015 02:19 PM

Vielen lieben Dank.
Es funktioniert ausgezeichnet.
Bin auch Kärntner vom Gailtal Presseggersee.
Bin nächste Woche in Kärnten, darf ich Sie auf ein Dinner einladen?

arminthurner@gmx.at

www.i-pointpartner.net
+436801263158
Liebe Gruesse
Armin Thurner

Thanks Armin

Continue the discussion