Converting cents to euros
fab
-
sddf -
sddf -
Hello,
I have a file containing lines with a field separator of ";".
Some identified fields contain prices in cents and I want to convert them to euros.
How can I insert a comma before the last two digits of these fields?
Example line:
article1;1234500;in stock;567890
article2;987600;out of stock;3456730
.
.
Fields 2 and 4 need to be processed to obtain:
article1;12345,00;in stock;5678,90
article2;9876,00;out of stock;34567,30
Do you have any ideas?
Configuration: Windows 7 / Firefox 19.0
I have a file containing lines with a field separator of ";".
Some identified fields contain prices in cents and I want to convert them to euros.
How can I insert a comma before the last two digits of these fields?
Example line:
article1;1234500;in stock;567890
article2;987600;out of stock;3456730
.
.
Fields 2 and 4 need to be processed to obtain:
article1;12345,00;in stock;5678,90
article2;9876,00;out of stock;34567,30
Do you have any ideas?
Configuration: Windows 7 / Firefox 19.0
it will be accessed through Excel.
some prices are at 0!
I am still looking
if I find something I will communicate
sprintf("%.2f",$i/100) in an awk
thank you