Results 1 to 6 of 6

Thread: Converting String to Long?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Location
    Atlanta
    Posts
    104

    Converting String to Long?

    I have a string.. it looks like this:
    "21670119994"

    I want to convert that to a long integer.. I get an error when I use Clng("21670119994").

    Is there a better way to do this.

    Thanks in advance. I know, I should already know this.. but I've never had to do it before so now it matters. =).

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    well what is the error?!

  3. #3
    Addicted Member Pickler's Avatar
    Join Date
    May 2001
    Location
    nffanb
    Posts
    248
    The range for a 'long' is -2,147,483,648 to 2,147,483,647.

    Convert to a 'single' or a 'double' instead.

  4. #4
    Software Eng. Megatron's Avatar
    Join Date
    Mar 1999
    Location
    Canada
    Posts
    11,286
    Or you could convert it to "Currency"

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Location
    Atlanta
    Posts
    104
    Actually, I found a little snip that does what I needed.. I just send it as a string (because that's how I get the information), and the snip converts it to a byte array and then processes it.

    Thanks for the help. =).

  6. #6
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Go ahead and post the code so someone searching the forums for this solution will find it in this thread.... (heck, I might sometime need it too)

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