May not be relevant anymore, and may not be very good practice but I did this using string functions and created a function out of it. Seems to perform extremely well. I have this on my site, if you could recommend somewhere else to host it that would be great.
http://www.codersonline.net/C2/NumberFormat.zip