$a = 348
"{0:N2}" -f $a
"{0:D8}" -f $a
"{0:C2}" -f $a
"{0:P0}" -f $a
"{0:X0}" -f $a
348.00
00000348
¥348.00
34,800%
15C
参考:
https://technet.microsoft.com/en-us/library/ee692795.aspx
http://www.pstips.net/formatting-numbers-easily.html
http://www.pstips.net/formatting-string.html
格式化输出数字
原文:http://www.cnblogs.com/IvanChen/p/4492992.html