ROund number to 1st decimal place in VBScript.

Posted on 2012-08-23
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.

Question by:jlcannon
    LVL 52

    Accepted Solution

    round(rs("field"),1) will turn 10.55 to 10.60

    Author Closing Comment

    perfect and concise.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
    Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  ( Here (http…
    Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now