I am looking for number format as per following 1200,00,000.00

Hi Team,

I have following value 120000000.00 and I want this value suppose to show as per following number format.

Input value : 120000000.00
Expected number format : 1200,00,000.00

Kindly assist me.

2 Likes

Hi @kawalkarhemant,

Try this one

int number = 1234567890
Convert.ToDecimal(number).ToString("#,##0.00")
You will get the result 1,234,567,890.00

Regards,
Arivu

5 Likes

My expected format is - 1200,00,000.00

It has been answered to you already here, If I am not wrong :slight_smile:

Hi @kawalkarhemant,
Here I have attached the file to fix your situation.

File : NumberFormat.zip (2.3 KB)

Note :
You can define your custom format. I have used the “en-US”. But if you want , you can change your own culture and specify the separators for grouping and decimal.

Regards
Balamurugan

5 Likes

This time format is different buddy. :slight_smile:

out_value=in_Value.ToString(“N2”, nfi)

Hey buddy appreciate your answer.
However, can you please explain here what is “N2” in above code?

Hi @kawalkarhemant,

The “N2” is, after the decimal digits. you can use “N3”, The result should be like this “1200,00,000.000”

Regards
Balamurugan

@kawalkarhemant I went through the link provided by Dominic.Your format is same as the solution provided in link

1 Like

Hi,

I got the expected output. I just want to know what is “N2” in your vb.net code?

Hi @kawalkarhemant,

N2 means after dot two digits will allow.

Refer this link

“N” or “n” Number
For example

1234 ->"N" -> 1 234
1234 ->"N1" -> 1 234.0
1234.56 ->"N2" -> 1,234.56
1234.56 ->"N3" -> 1,234.560

Regards,
Arivu

2 Likes

Hi @kawalkarhemant and all members,

I have created a custom activity to format the double and number values instead of using the code invoke. Using this activity you can able to format in any combination. It has 2 activities. One is for double value and another one is for integer. I Hope it will helpful .

Below I have attached

Thank you
Balamurugan.S

2 Likes

I have question
My input is 1,234.00 and sometimes it is like 1.234,00 so i need to remove last 2 nos and the seperator. I wanted to remove irrespective of seperator. How can we do this

Hi @Darshhan,

I have release a new version of the below one. In the Double Formater, you can leave empty in the property “AfterDecimalFormat”. It will not show the decimal fractional.

Regards
Balamurugan.S

1 Like