String to decimal

Stimulsoft Reports.WEB discussion
Post Reply
sthe
Posts: 5
Joined: Tue Apr 26, 2011 1:22 am

String to decimal

Post 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
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

String to decimal

Post 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.
sthe
Posts: 5
Joined: Tue Apr 26, 2011 1:22 am

String to decimal

Post by sthe »

hi,
worked perfectly
thank you very much
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

String to decimal

Post by Andrew »

Great!

Have a nice day!
Thank you.
Post Reply