I try to format a string in a powershell 3 console like so:
PS C:\> "price : {0:C}" -f 15,99
price : ? 15,00
Instead of displaying the currency sign, I get a "?".
If I do the same command in ISE, the windows powershell IDE, I get:
PS C:\> "price : {0:C}" -f 15,99
price : € 15,00
Why is this? Do I need to enable a setting for the console session?
-Darrell
15,99in Powershell-land is an array of two ints, containing entries 15 and 99. Your format string contains only one slot, so only the 15 is used. It is not the single number "15 and 99/100", which I realize in Euro-style is often written "15,99". If you want that number, you need to use15.99