Home      Members   Calendar   Who's On

Welcome Guest ( Login | Register )
      

Home » Skelta BPM.NET 2006 » Skelta BPM.NET 2006 » Application Development » Convert Currency String into Decimal


Convert Currency String into DecimalExpand / Collapse
Author
Message
Posted Friday, March 20, 2009
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Post #1211
Posted Saturday, March 28, 2009
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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

Post #1234
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
-
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.

All times are GMT -5:00, Time now is 10:14am

 
Execution: 0.078.10 queries.Compression Enabled.

Copyright © 2002 - 2009 Skelta Software. All rights reserved. Tel: 1 (678) 306 4110 | Email:sales@skelta.com
Skelta - A BPM Workflow Software Company