Rounding results of a division to 2 decimal places
I have the following lines of code in the body section of a web page which is displaying data from a database using the DateBase Results Wizard:-
varDisplayAcres = fp_rs("plotarea")
varDisplayAcres = varDisplayAcres/4047
I am wanting to display a plot area of land which is on an Access database in square metres, also as acres. This involves dividing by 4047 as a good enough approximation. I need the results to be displayed to only 2 decimal places
Here is an example of what I am having displayed at the moment:-
Plot area (sq.m.) = 590. Acres = approx 0.145787002718063
I want the acres to be shown as 0.15 for preference, although simple truncation to 3 decimal places, i.e. as 0.145 would be acceptable.
This is I am sure simple, but I am without any textbooks/manuals where I am working at the moment.
(I know how to do this using an Access query with the calculation and the acres embedded within the Access query, but in this case I want to do the calculation outside of Access, and within the displaying web page).
Thanks for assistance.