Jan 25, 2006 #1 mdr2271 Programmer Sep 14, 2005 42 US Is it possible to format output as X,XXX and also as a percentage?
Jan 25, 2006 #2 emozley Technical User Jan 14, 2003 769 GB Do you mean take a number of any length and put commas in the right place or just numbers that are 4 digits long. Also what would it be a percentage of? If you had a value a and you wanted to show it as a percentage of b you would do: <% Response.Write(FormatNumber((a/b*100),1)) %> This would write it to one decimal place. Upvote 0 Downvote
Do you mean take a number of any length and put commas in the right place or just numbers that are 4 digits long. Also what would it be a percentage of? If you had a value a and you wanted to show it as a percentage of b you would do: <% Response.Write(FormatNumber((a/b*100),1)) %> This would write it to one decimal place.
Jan 25, 2006 #4 DotNetGnat Programmer Mar 10, 2005 5,548 IN try using... formatpercent() function... -DNG Upvote 0 Downvote
Jan 25, 2006 #5 Sheco Programmer Jan 3, 2005 5,457 US Bleh, ignore me, I thought I was in the forum for SQL Server Reporting Solutions Upvote 0 Downvote
Jan 29, 2006 #6 Bullschmidt Programmer May 20, 2003 331 US And for more on FormatNumber() and other VBScript functions: Visual Basic Scripting Edition Functions http://msdn.microsoft.com/library/d...html/adaabd2b-250e-4040-9eaa-127f5a41f8b9.asp Best regards, -Paul http://www.Bullschmidt.com - Freelance Web and Database Developer http://www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips Upvote 0 Downvote
And for more on FormatNumber() and other VBScript functions: Visual Basic Scripting Edition Functions http://msdn.microsoft.com/library/d...html/adaabd2b-250e-4040-9eaa-127f5a41f8b9.asp Best regards, -Paul http://www.Bullschmidt.com - Freelance Web and Database Developer http://www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips