Results 1 to 6 of 6

Thread: Newbie code inquiry?

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    3

    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...

  2. #2
    Lively Member
    Join Date
    Oct 2004
    Posts
    91

    Re: Newbie code inquiry?

    varr = 56789
    varr = varr/100

  3. #3
    Hyperactive Member Mosabama's Avatar
    Join Date
    Aug 2004
    Location
    Mars
    Posts
    306

    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!!!

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    3

    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!

  5. #5
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: Newbie code inquiry?

    Isn't multiplying by .01 faster for the CPU?

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

  6. #6

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    3

    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
  •  



Click Here to Expand Forum to Full Width