Number format issue

Hi Experts,

If i m passing value as 12000 to variable then i require it as 12,000.
And when i m passing value 120000 then i require it as 120,000.

How can i acheive this…

@SagarSB Check below link u will get numerous methods for doing it.

Hi @SagarSB,

This will fix your case.

Regards
Balamurugan.S

Can anyone show me this with we example ,
According to situation mentioned by me above

@SagarSB
ex:- my=12345
my.ToString(“N0”)
output- 12,345

ex:- my=12345
my.ToString(“N”)
output- 12,345.00

There are other methods in link also u try it out

@Manjuts90

if my input is 12000 then expected is 12,000.
and if 120000 then expected is 120,000.

@SagarSB Are you expecting dot at the end?

@Manjuts90
no

@SagarSB then below method will work for u.

for me this works (must be as a string)
string.format("{0:n0}", <variable.string>)

@Manjuts90

what if input is 120000.

I want 120,000 for this input

@SagarSB what problem u getting in above method

@Manjuts90

actually i m matching this value with applications generated value.
the application generates 12,000 if value is in thousand.
so i am converting my input to 12,000 format.
but when the value generated in application is in millions as 120000 , application generate it as 120,000.
here my variable taking value 1,20,000…hence i m facing problem.

@SagarSB if your value 1200000 then ur output must be 1,200,000 right?

@Manjuts90

no…
if 120000 then 120,000

@SagarSB i am getting that output from above method

Hi @SagarSB,

Here is the example with output.

Output :

image

image

Here is the activity

File : nn.zip (1.6 KB)

Regards
Balamurugan.S

1 Like

@balupad14

Thank you so much i will try and let you know

1 Like

@balupad14

what you have pass in Properties of activities

Hi @SagarSB,

Case-1
Format : “##,###”
GroupSeparator: “,”

Case-2
Format : “###,###”
GroupSeparator: “,”

Regards
Balamurugan.S