Computing.Net > Forums > Programming > VBS question

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

VBS question

Reply to Message Icon

Name: philipl
Date: February 11, 2004 at 15:06:31 Pacific
OS: win2000
CPU/Ram: 800/256
Comment:

Is there a function that will return an integer to its nth decimal? For example if the integer is 3.456465, then the function has to return 3.4 (assumming it is to the first decimal)
Any help is appreciated~
Thank you~



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: February 11, 2004 at 15:27:46 Pacific
Reply:

YourVariable = Format(number,"###0.0")

The format will always return one decimal point even it is zero and 0.0 if number is zero.


Stuart


0

Response Number 2
Name: philipl
Date: February 11, 2004 at 16:22:42 Pacific
Reply:

Oh thank you~hehe
I found another method too~
There was a round(number,numberOfDecimal) function too.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


creating a vector c++/ HE... loop iterations



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VBS question

2 VB Questions www.computing.net/answers/programming/2-vb-questions/3577.html

2 VB questions www.computing.net/answers/programming/2-vb-questions/3388.html

An easy VB question www.computing.net/answers/programming/an-easy-vb-question/929.html