?
Solved

ROund number to 1st decimal place in VBScript.

Posted on 2012-08-23
2
Medium Priority
?
1,240 Views
Last Modified: 2012-08-23
I am reading data from an excel file to an ASP via VBScript. In excel I have it set to round to the 1st place after the decimal but when I pull it to the web it shows the whole number, sometime 6 - 8 places after thedecimal. How can I round that number? The way I am getting the data is just as follows.

<td><%=rs.fields(5)%>&nbsp;</td>
0
Comment
Question by:jlcannon
2 Comments
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 38324787
round(rs("field"),1) will turn 10.55 to 10.60
0
 

Author Closing Comment

by:jlcannon
ID: 38324824
perfect and concise.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question