How to display 2 decimal places without rounding

[ad_1]

Hello @henrysonlaya

I tested the PREC operation with the number you mentioned in your entry and it works fine. Please, look at the screenshot image below:

Note you have three alternatives. You can use the PREC operation:

PREC((fieldname5-fieldname6)*fieldname7, 2);

The ROUND operation:

ROUND((fieldname5-fieldname6)*fieldname7, 0.01);

Or you can use the CEIL operation:

CEIL((fieldname5-fieldname6)*fieldname7, 0.01);

Learn more about the rounds operations and their attributes by reading the following blog post:

https://cff.dwbooster.com/blog/2020/09/20/rounding-numbers

Best regards.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer