If I have a value of 3.6 I want it to display as 3.60.
I am sure it’s simple but I couldn’t find the answer on google.
Basically I’m trying to display money amounts. But when I do convert(money,[stuff to convert]) it displays anything that is a multiple of ten units without the extra zero in the second decimal place. For display purposes I want it to display the zero.
For future reference, you should always store money as an integer number of cents (or pence) and not as a float. It’s much easier to do all your accounting math and divide by 100 only when you need to display a value to the user.
ETA: If your database has a built-in money type, I believe that’s essentially what they do under the hood.
Hehe I was gonna give that lecture. As a contractor lately I can’t count the number of times I have been tasked to track down a variance only to find that money is being stored as a float or with too much precision and the bits add up to something that was never there.