inov8iv Posted August 10, 2007 Share Posted August 10, 2007 (edited) I tried many searches for format number, fix number, set, round, etc..... I have a number lets say "0" and instead of showing as "0" when output i want it to be "0.00" or instead of .1 - 0.10 ? Thanks in advance..... Edited August 10, 2007 by inov8iv Link to comment Share on other sites More sharing options...
tAKTelapis Posted August 10, 2007 Share Posted August 10, 2007 I am not entirely sure on this, but i think StringFormat() is what you are looking for.. eg, for 2 decimal places: $no = 5.1 $string = StringFormat("$no = %.2f", $no) msgbox(0, "", $string) Cheers /tAK Link to comment Share on other sites More sharing options...
inov8iv Posted August 10, 2007 Author Share Posted August 10, 2007 I am not entirely sure on this, but i think StringFormat() is what you are looking for.. eg, for 2 decimal places: $no = 5.1 $string = StringFormat("$no = %.2f", $no) msgbox(0, "", $string) Cheers /tAK Heh, thank you, I figured it would not be to difficult, it was just a matter of finding the proper format. I ended up using. $Variable = .1 StringFormat(" %.2f ", $Variable) output was 0.10 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now