[AccessD] CSV and currency symbols

Gustav Brock Gustav at cactus.dk
Tue Oct 14 10:48:46 CDT 2008


Hi Andy

One method is to save the amounts * 100 as integers and divide by 100 when reading. Many mainframe systems do this.

Another is to take control in your code and always save with dot as decimal separator and assume that as well when reading. 
This is very easy to perform: 
Use LTrim(Str(curAmount)) for writing the string and Val(strAmount) for reading.

/gustav

>>> andy at minstersystems.co.uk 14-10-2008 17:16:38 >>>
Hi to the internationalists

Before I cook something up myself has anyone already done this?

I'm writing a system that will be run in France but will take data produced
in CSV files in the UK as wel as on the continent. This means that a CSV
file produced in UK will output a number as, eg, 123.45 whereas one in
France will write 123,45. So I guess I'll have to read everything into a
text field and parse it to write out a number in whichever is the local
format (France as I say, but who knows if someone may decide to run it in
UK).

Anyone handled this situation and have any useful bits & pieces?

--
Andy Lacey
http://www.minstersystems.co.uk 






More information about the AccessD mailing list