May 16, 2001 #1 aojonesoa Technical User Apr 25, 2001 40 US I'm trying to fix a number to 2 decimal places even if the calculated value ends in zero. How do you do that in VBScript? Thx
I'm trying to fix a number to 2 decimal places even if the calculated value ends in zero. How do you do that in VBScript? Thx
May 16, 2001 #2 link9 Programmer Nov 28, 2000 3,387 US rnd(number, 2) Where 'number' is the variable, and 2 is the number of places to format to -- and this is the best quick ref out there: http://www.devguru.com/Technologies/vbscript/quickref/vbscript_intro.html will save you mucho time. Paul Prewett Upvote 0 Downvote
rnd(number, 2) Where 'number' is the variable, and 2 is the number of places to format to -- and this is the best quick ref out there: http://www.devguru.com/Technologies/vbscript/quickref/vbscript_intro.html will save you mucho time. Paul Prewett
May 17, 2001 1 #3 Mighty Programmer Feb 22, 2001 1,682 US You could also use: formatnumber(number,2) where number is your variable and 2 is the number of decimal places. Mise Le Meas, Mighty Upvote 0 Downvote
You could also use: formatnumber(number,2) where number is your variable and 2 is the number of decimal places. Mise Le Meas, Mighty