I am trying to round a field to a whole number, avoiding decimal places> While Acrobat's formatting seemingly allows this to happen, when exporting the data captured on a form the whole value is given i.e. 1000 is exported as 1000.1677777.
I am already using a calculation to obtain the value, being
if( this.getField("GSTV").value > 0)
event.value = this.getField("GSTV").value / this.getField("GSAN").value
event.value = "";
Does anyone know of a format string or calculation string I can include to achieve the desired result.
Thank you in advance
function Round(nValue, iDecimals)
Purpose: round a nmber to a given number of decimal places
nValue - number to be rounded
iDecimals - number of decimal palces for the rounded results
Returns: the round value of the nValue
return util.printf("%,0 0." + iDecimals + "f", nValue)