Results 1 to 6 of 6

Thread: converting 101,8194 to 101,81

  1. #1

    Thread Starter
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172

    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.
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  2. #2
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    259
    Hey, to change the numer 8821.416,

    you can do:
    VB Code:
    1. Format(8821.416, "0.00") 'Produces 8821.41
    2.  
    3. 'Or you can do:
    4. Round(8821.416, 2) 'Produces 8821.42
    SonicMailer Pro
    The best mailing list manager has just gotten better!
    Click here for a full list of features!

  3. #3

    Thread Starter
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172
    hey thanks.. that works like a charm
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  4. #4
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    259
    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.
    SonicMailer Pro
    The best mailing list manager has just gotten better!
    Click here for a full list of features!

  5. #5

    Thread Starter
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172
    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
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  6. #6
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    259
    What is your code. I just opened VB and put

    VB Code:
    1. MsgBox Format(8.1, "0.00")

    gives me 8.10.
    SonicMailer Pro
    The best mailing list manager has just gotten better!
    Click here for a full list of features!

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