Skip to main content
Solved

Remove Trailing Zeros from Amount

  • February 6, 2023
  • 6 replies
  • 197 views

Forum|alt.badge.img+4

Hello Team,

I have amount field that can have values like below 

123.450

123.400

123.456

123.000

I have to remove the trailing zeros and the result should be like below:

123.450 = 123.45

123.400 = 123.4

123.456 = 123.456

123.000 = 123

Can you please help here.

 

 

 

 

Best answer by ChanduMohammad

Hi @Ankith K 

Checkout below solution,

Note: In Replace With add a space by keying in space bar from your keyboard

 

View original
Did this topic help answer your question?

6 replies

Forum|alt.badge.img+6
  • Navigator | Tier 3
  • 142 replies
  • February 6, 2023

Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • 10 replies
  • February 6, 2023

@Sumit.K7 , thanks for the response. Just one thing here, when the input is 1.0, we need response as 1 instead of 1.0


Forum|alt.badge.img+6
  • Navigator | Tier 3
  • 142 replies
  • February 6, 2023

Use this : Replace text matching following regex with empty values

\.?0+$

https://regex101.com/r/lKmsde/1


Forum|alt.badge.img+19
  • Most Valuable Pathfinder
  • 2694 replies
  • Answer
  • February 6, 2023

Hi @Ankith K 

Checkout below solution,

Note: In Replace With add a space by keying in space bar from your keyboard

 


Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • 10 replies
  • February 10, 2023

Thank you guys for your prompt support, this really helped. 


Forum|alt.badge.img+19
  • Most Valuable Pathfinder
  • 2694 replies
  • February 10, 2023
Ankith K wrote:

Thank you guys for your prompt support, this really helped. 

Amazing @Ankith K 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings