in powershell v2, I need to divide 22 by 8 and then strip all the decimal places after the decimal point (which is on my system a comma). No rounding.
As you see. 22/8 equals 2,75
PS C:\Documents and Settings\Administrator> $(22/8) 2,75
Expected result is 2.
Strangely, I get different results when using different ways to calculate the same.
PS C:\Documents and Settings\Administrator> "{0:N0}" -f $(22/8)
3
PS C:\Documents and Settings\Administrator> "{0:N0}" -f 2.75
3
PS C:\Documents and Settings\Administrator> "{0:N0}" -f 2,75
2
Some other examples...
PS C:\Documents and Settings\Administrator> "{0:N0}" -f 2.15
2
PS C:\Documents and Settings\Administrator> "{0:N0}" -f 2,15
2
What is the cause?