Hi All,
I am trying to split a field retrieved from a database and multiple the two numbers together.
Example
Field retrieved 12/2 as string.
I need to multiple the 12 * 2 and then multiple that against the cost of an item.
I know I can possibly use the split function, but am not sure where to go from there. I found this code, but not sure how to manipulate it to multiple the two numbers
Dim i As String = "12/2"
Dim a() As String
Dim j As Integer
a = i.Split("|")
For j = 0 To a.GetUpperBound(0)
MsgBox(a(j))
Next
Can someone please help me or give me another suggestion?
Thanks
I am trying to split a field retrieved from a database and multiple the two numbers together.
Example
Field retrieved 12/2 as string.
I need to multiple the 12 * 2 and then multiple that against the cost of an item.
I know I can possibly use the split function, but am not sure where to go from there. I found this code, but not sure how to manipulate it to multiple the two numbers
Dim i As String = "12/2"
Dim a() As String
Dim j As Integer
a = i.Split("|")
For j = 0 To a.GetUpperBound(0)
MsgBox(a(j))
Next
Can someone please help me or give me another suggestion?
Thanks