| | | Forum Newbie
       
Group: Forum Members Last Login: Tuesday, January 12, 2010 Posts: 3, Visits: 7 |
| Hi, Am using BPM.NET 2006 framework. And here's what am trying to do.
I have a currency value, say $100.00, but its a string data type.
So these are the following variable I created.
String1 = I receive the currency(string) field String2 = Variable.String1.ToString().Trim('$') -> To get rid of the "$" sign Number1 = Convert.ToDecimal(Variable.String2.ToString())
I am able to get through the first 2 variables, but am not able to update the last variable (Number1).
I earlier intended to have this as a generic solution for negative numbers also, like in case where l have $(100.00), I would have find the index of "(" and ")" and use a substring method to get the decimal value.
Could anyone please let me know, what am I doing wrong ?
Thanks, Karthic |
| | | | Supreme Being
       
Group: Forum Members Last Login: Thursday, June 02, 2011 Posts: 90, Visits: 150 |
| | Hi Karthic, Please try the following. Number1 = Convert.ToInt32(Variable.String2.ToString());
Regards,
Moderator |
| |
|
|