Hi all,
I'm formatting numbers from a SQLite table where the stored data type is REAL.
Some of the records (ItemPrice field) have a 0 (zero) value in them. I'd like to use the formatting as such:
For those records with a value greater than zero, it has 2 decimal places, but when the value is 0 (zero), there is no formatting. It displays as 0. I'd expect 0.00.
Anyone know why this is and how to correctly format zeros?
Thanx,
Mark S.
I'm formatting numbers from a SQLite table where the stored data type is REAL.
Some of the records (ItemPrice field) have a 0 (zero) value in them. I'd like to use the formatting as such:
B4X:
Dim Price As Double = 0
Price = NumberFormat(cr.GetDouble("ItemPrice"),0,2)
For those records with a value greater than zero, it has 2 decimal places, but when the value is 0 (zero), there is no formatting. It displays as 0. I'd expect 0.00.
Anyone know why this is and how to correctly format zeros?
Thanx,
Mark S.
Last edited: