Convert string to integer

Stimulsoft Ultimate discussion
Post Reply
User avatar
Fabio Pagano
Posts: 352
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Convert string to integer

Post by Fabio Pagano » Wed May 15, 2019 9:39 am

Hello,
I have this data "01 h 11 m"
I need to convert part of this data to numeric

so I delimitate a part of data
Mid(Lavori.Rapporto.Chiamata__Tempo_totale__h_m__,5,2)

stimul returns "11" such as string

I need to convert "11" string to 11 numeric

Thanks in advance
Lech Kulikowski
Posts: 1526
Joined: Tue Mar 20, 2018 5:34 am

Re: Convert string to integer

Post by Lech Kulikowski » Wed May 15, 2019 1:10 pm

Hello,

You can sue the Parse() method:
{Int32.Parse(Mid(Lavori.Rapporto.Chiamata__Tempo_totale__h_m__,5,2))}

Thank you.
User avatar
Fabio Pagano
Posts: 352
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Re: Convert string to integer

Post by Fabio Pagano » Wed May 15, 2019 1:49 pm

Hello,
It works!
Thank you.
Lech Kulikowski
Posts: 1526
Joined: Tue Mar 20, 2018 5:34 am

Re: Convert string to integer

Post by Lech Kulikowski » Thu May 16, 2019 9:18 am

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply