locked
Conversion to Integer, Decimal, Double RRS feed

  • Question

  • User-668204308 posted

    So, yes, I've tried with these three formats, and the problem remains the same:
    I have a string, "s"

    For Each s As String In stringarray

    and this array is recieving data from a streamreader that is reading a csv file.

    The data I'm having dificulty reading are these very specific numbers(yes, only these numbers, because phone numbers get home safe and sound).

    The numbers I'm talking about are usually decimal.

    ValueList.Add(Convert.ToDecimal(s))

    Now, when I convert them like that, they always bring a "D" alongside with them. I've personally checked the string multiple times, and it just has a "1", and somehow, my list recieves "1D" as a number, same thing happens with decimal numbers(0.29D for example). I've tried with Doubles and Integers, the result is the same.

    Why is this happening? Can anybody tell me?

    Thursday, June 9, 2011 10:47 AM

Answers

  • User-668204308 posted

    Silly me. I was reading the wrong column. A time column. That's why the whole thing is failing.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 9, 2011 11:02 AM