Frank Castle
New member
- Joined
- Jul 30, 2008
- Messages
- 2
- Programming Experience
- 10+
new to VB.net and have the following issue
I am wanting to receive an XML String field with a decimal in it and add it to another XML string field with a decimal value in it. However, during type conversion the decimal positions are truncated if they are zero, this is not desirable.
for example. String 100.00 + String 120.00 = 220.00
Return val As Decimal produces 220
I was wondering if someone could tell me the proper way to code this snippet. I am getting an error "Format not declared"
Public Function Reformat(ByVal val1 As Decimal) As Decimal
Dim val2 As Decimal = Format(val1,"##0.00")
Return val2
End Function
I am using this code inside of a Biztalk functoid in a map between an XML string input and an XML string output and simply want the decimal places to appear.
thanks
I am wanting to receive an XML String field with a decimal in it and add it to another XML string field with a decimal value in it. However, during type conversion the decimal positions are truncated if they are zero, this is not desirable.
for example. String 100.00 + String 120.00 = 220.00
Return val As Decimal produces 220
I was wondering if someone could tell me the proper way to code this snippet. I am getting an error "Format not declared"
Public Function Reformat(ByVal val1 As Decimal) As Decimal
Dim val2 As Decimal = Format(val1,"##0.00")
Return val2
End Function
I am using this code inside of a Biztalk functoid in a map between an XML string input and an XML string output and simply want the decimal places to appear.
thanks
Last edited: