I need to format a field to have 4 decimal places.
I am using,
it should be 9(09)V9(04)at least that is the format in Cobol.
I could do
$vQTY = $data[7]*10000;
$vQty = sprintf("%0*d", 13, $vQTY);
That would put the digits in the correct place, but it isn't really correct.
I am using,
Code:
$vQty = sprintf("%0*d", 13, $data[7]);
it should be 9(09)V9(04)at least that is the format in Cobol.
I could do
$vQTY = $data[7]*10000;
$vQty = sprintf("%0*d", 13, $vQTY);
That would put the digits in the correct place, but it isn't really correct.