Jan 25, 2006 #1 mdr2271 Programmer Joined Sep 14, 2005 Messages 42 Location US Is it possible to format output as X,XXX and also as a percentage?
Jan 25, 2006 #2 emozley Technical User Joined Jan 14, 2003 Messages 769 Location 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 #3 Sheco Programmer Joined Jan 3, 2005 Messages 5,457 Location US Try this format mask: #,##0% Upvote 0 Downvote
Jan 25, 2006 #4 DotNetGnat Programmer Joined Mar 10, 2005 Messages 5,548 Location IN try using... formatpercent() function... -DNG Upvote 0 Downvote
Jan 25, 2006 #5 Sheco Programmer Joined Jan 3, 2005 Messages 5,457 Location 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 Joined May 20, 2003 Messages 331 Location 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