I have a column TOTAL_DOLLARS that holds String values that I want to convert to Decimal. However, these values also have a $ character preceding them (as they are dollar amounts). I want to remove this $ character, though I can’t quite find a method to do so.
Here is what I’m trying:
For Each row As DataRow In myTable.Rows
Replace(row.Item("TOTAL_DOLLARS"), "$", "")
Next
Any help is much appreciated.
Assuming you want to preserve data integrity on your “TOTAL_DOLLARS” column, simply add a new column of the desired type and loop through to fill it:
or like this (to preserve NULLs):