hello,
I have a spreadsheet with currency values. When I assign it to string, the output does not include the dollar sign or comma. However, I also need the output to show numbers only, not the decimal point.
example 82019.79 need output to be: 8201979
I have searched the forum, but maybe missing something.
Thanks! for values that do not have cents, I need to output the zeros without the decimal. Right now, if the value does not have cents, it only outputs the numbers before the decimal. is there one statement that could handle both?
If it correctly recognizes the values as numbers (which seems to be the case), you could multiply by 100. Int64 finalvalue = CLng(CDbl(readValue)*100)
Using int64 here for safety, if your numbers are small enough standard Int32 will suffice as well.
You can use Convert.ToInt64 and Convert.ToDouble respectively instead of shorthand forms as well.
As a side question - are you sure you want the value increased?