Page 1 of 1

String to decimal

Posted: Wed May 04, 2011 8:39 am
by sthe
hello
in my report i have a database field in the form of e.g "0.5 STD","4.5 STD", "1,5 STD" etc
how to do i convert this string into the decimal without the " STD"?

thank you in advance

String to decimal

Posted: Fri May 06, 2011 8:30 am
by Ivan
Hello,

Please try to use the following expression, for example:

Code: Select all

{decimal.Parse(yourField.Substring(0, yourField.Length - 4))}
Thank you.

String to decimal

Posted: Mon May 16, 2011 7:27 am
by sthe
hi,
worked perfectly
thank you very much

String to decimal

Posted: Mon May 16, 2011 2:03 pm
by Andrew
Great!

Have a nice day!
Thank you.