i have a smallmoney value in db as 25.00 when i read it to .net decmial it became 25.0000 on the asp.net gridview. where did it tack on the extra two digits?
+1
A:
This is totally a consequence of formatting - The actual value in the database is simply 25 in both cases.
Charles Bretana
2008-11-21 16:58:24
A:
It's simply a case of the default precision and display of the various formats. If you want the data to display in a certain format, it's best to be explicit about that format.
ahockley
2008-11-21 17:00:12
A:
smallmoney and money in SQLServer both have 4 digits of precision after the decimal.
The formatting in SQL is probably irrelevant to your scenario, but if you format it in SQL you have several options.
Cade Roux
2008-11-21 17:03:42