leading zeros & trailing zeros

C

CMcGrann

I am trying to export a table to create a file. I am trying to export a
fixed field length of 15 positions for a dollar amount. The field must have
leading zeros and if the amount ends with a zero (example 12.50) it must
contain the trailing zero(s). How to I accomplish this???

Field is: 12.50
I need: 000000000001250
 
K

Klatuu

Use the Format Function:

= Format(SomeVariable * 100, "000000000000000"

The multiplication by 100 is necessary to avoid losing the cents altogether.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top