We help IT Professionals succeed at work.
Get Started

Format a decimal to string

cebu1014
cebu1014 asked
on
2,973 Views
Last Modified: 2012-05-11
I didnt develop this code. I want to modify the last line.
The promodsc will be a negative number with decimal value. I want to eliminate the sign and decimal. For example promodsc is -4.99. I want it change to 499. The rest of command will give me 0000000499+ string I need. What do I need to change here?

REPLACE TAX_AMT   WITH RIGHT("0000000000" + ALLTRIM(B->TAXTOTAL),10) + "+"
   REPLACE FRT       WITH RIGHT("0000000000" + ALLTRIM(B->SHIPTOTAL),10) + "+"
   REPLACE BPAY_TYP  WITH "04"
   REPLACE DISC_AMT  WITH RIGHT("0000000000" + ALLTRIM(b->promodsc),10) + "+"
Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 3 Answers and 9 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE