int32型変数int_Aの右から2文字目をint_Aに格納するする構文をご教授ください。

UiPath Studio 2023.10.0 EnterPrise Licenseの初心者ユーザです。

int32型変数int_Aの右から2文字目をint_Aに格納するする構文をご教授ください。
一度String変数への変換が必要なんでしょうね。。

Hi @gorby

You can use the below syntax -

- Assign -> Int_A = 123456
- Assign -> Int_A = Cint(int_A.toString.Substring(int_A.ToString.Length - 2, 1))

Check the below workflow for better understanding,

Hope it helps!!

Hi @gorby

Please try this

int_A = Convert.ToInt32(int_A.ToString().Substring(Math.Max(0, int_A.ToString().Length - 2), 1))

Cheers!!

こんにちは

Stringに変換しなくても可能です。以下お試しください。

intA =     (intA mod 100) \ 10

\ は半角円マークになります。

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.