|
-
Dec 7th, 2002, 05:06 PM
#1
Thread Starter
Frenzied Member
converting 101,8194 to 101,81
i need to convert some currency's from 101,8194 to a number with xxxx,xx << always 2 numbers after the comma.... how can this be done? (and if possible let it change the value if greater than 5 dunno really what the name is for that
Last edited by Ultimasnake; Dec 7th, 2002 at 06:10 PM.
-
Dec 7th, 2002, 05:14 PM
#2
Hyperactive Member
Hey, to change the numer 8821.416,
you can do:
VB Code:
Format(8821.416, "0.00") 'Produces 8821.41
'Or you can do:
Round(8821.416, 2) 'Produces 8821.42
-
Dec 7th, 2002, 05:32 PM
#3
Thread Starter
Frenzied Member
hey thanks.. that works like a charm
-
Dec 7th, 2002, 05:41 PM
#4
Hyperactive Member
No problem... Format() is a really useful function, but I often don't use functions built into VB because right now, I am working with 3 languages... and I really think it is best to develop a functioin to do it all for you, or whatever... and then that way it can be carried over to other languages.
-
Dec 7th, 2002, 06:01 PM
#5
Thread Starter
Frenzied Member
i still have a problem that Format(8821.416, "0.00") doesnt seem to solve.. and that is that 8,1 should become 8,10 :S or am i doing something wrong :S
-
Dec 7th, 2002, 06:26 PM
#6
Hyperactive Member
What is your code. I just opened VB and put
VB Code:
MsgBox Format(8.1, "0.00")
gives me 8.10.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|