title: Convert number to currency
body: <p>We need to convert a plain number to a currency value. However, nothing we find seems to work.</p>
  
  <p>We tried the basic code below, but that returns a value of $123,456.00 when it should be $1,234.56. </p>
  
  <pre><code>$rawNumber = 123456
  $newNumber = 0
  
  $newNumber = "{0:c}" -f $rawNumber
  </code></pre>
  
  <p>We tried different iterations of "{0:c}" (c2, c1,etc), but it always returns a number, but just adding zeroes on to the end.</p>
  
  <p>We tried converting the number to a string and inserting the decimal, commas and dollar sign, but we're dealing with numbers that can be as short as two or as long as ten, so it becomes something of a beast to try and plan for every possible combination. </p>
  
  <p>Are we missing something obvious to easily convert numbers to a currency value?</p>
  
  <p>Thank you for any help you can provide.</p>