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...
Printable View
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...
varr = 56789
varr = varr/100
Do you mean this number as an example ?? or only this number?
cause this doesnt work on any number .. lol
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!
Isn't multiplying by .01 faster for the CPU?
Bill
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!