|
-
Feb 2nd, 2006, 08:53 PM
#1
Thread Starter
New Member
Newbie code inquiry?
I wonder how can i change this 56789 to this 567.89? Thanks in advance! I'm so srry I'm newbie in VB... Hope you could help me...
-
Feb 2nd, 2006, 09:51 PM
#2
Lively Member
Re: Newbie code inquiry?
varr = 56789
varr = varr/100
-
Feb 2nd, 2006, 09:54 PM
#3
Hyperactive Member
Re: Newbie code inquiry?
Do you mean this number as an example ?? or only this number?
cause this doesnt work on any number .. lol
My software never has bugs. It just develops random features.
I RATE, YOU RATE!!!
-
Feb 2nd, 2006, 11:21 PM
#4
Thread Starter
New Member
Re: Newbie code inquiry?
well it shoud be any number. honestly the reason why i need to do this because we have data (BTRIEVE) that is originally written like this 56798 instead of 567.98. meaning our database (the field is RetailPrice) all records on that field are all whole nos., instead of float/ real nos. there is a small program written in C++ that break that whole no. into whole digit and the two digits from the right are (constant) decimals. that's why i need to convert it to vb. i am transferring the record to mysql with the correct format already by splitting it up. but ur solution is basically good! i did not think about that... huh! huh logic... i'm sorry i am really bit damn bout this... thnx a lot! i am thinking too much about splitting it using split and so on and so forth only simple math solved the prob. anyway! thanks a lot!
-
Feb 3rd, 2006, 01:37 AM
#5
Re: Newbie code inquiry?
Isn't multiplying by .01 faster for the CPU?
Bill
-
Feb 3rd, 2006, 03:48 AM
#6
Thread Starter
New Member
Re: Newbie code inquiry?
that's good question... but for me i think multipying is the best and fastest execution by the cpu. thanks guys for all your help!
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
|