Double price = 123.45000; DecimalFormat format = new DecimalFormat("0.####"); System.out.println(format.format(price));
WITH CTE AS(SELECT 123.45000 AS id UNION ALL SELECT 123.45000000 UNION ALL SELECT 603.50 ) SELECT CAST(id AS FLOAT)AS ID FROM CTE; --- ID --- 123.45 123.45 603.5
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)