This blog post is a great little cheat-sheet to keep handy when trying to format strings to a variety of formats.
link to trojan removed
Edit
The link was removed because Google temporarily warned that the site (or related site) may have been spreading malicious software. It is now off the list an no longer reported as problematic. Google "SteveX String Formatting" you'll find the search result and you can visit it at your discretion.