I am trying to format this with two number to the right of the decimal. “N0 {0.00} formatted” the values I have are objects not INT. How do I clean this up?
To use formatting you can use the -f operator but bear in mind that this only returns strings so sorting may not work as you’d expect. Here’s an example:
"{0:N2}" -f [Math]::Pi
This takes the values to the right of the -f operator, inserts it into the string “template” at position 0 (denoted by the first 0) and formats it as a number with 2 decimal places (N2)