I have a table backed by mysql database with fields set as DECIMAL(19,2) which when I run a query on, returns the numbers formatted as 0.00 as expected. When in asppsmith, the query returns the numbers but does not respect the 0.00 format, instead returning 3.50 as 3.5, or 3.00 as 3. How can I format the table column to always show 2 decimal places?
In the table, go to the column settings for this column and set the computed value using toFixed() (see the screenshot attached).
Note that the parameter passed to
toFixed() will be number of decimal places the value will be expressed in (i.e toFixed(3) will make the number to 3 decmial places)
Thanks so much! Perfect!