Force Decmials To Show

  • Thread starter Thread starter ChrisR
  • Start date Start date
C

ChrisR

I have some data (prices) where I want ever value to go to 3 decimals
regardless of value. If price is 8 I want it to be 8.000, if it is 12.15 I
want 12.150

Don't want currency sign. I have tried playing with format, multiplying by
1 and doing format function, etc. Sometimes it displays correctly in select
statement, but it never actually displays as x.xxx when I export to text
file. I have to have it display the 3 places to right of decimal in the
text extract for loading into another system

Any help would be greatly appreciated.

c-
 
Seems to me that 8. 8.0 8.00 and 8.000 are all excatly the same thing.
Any software taking these numbers should know that.

I'm not sure if you will be able to force this on an export unless you set
your format and place the formatted values into a TEXT field and then use
that field to do your export.

Maybe someone will have a better idea.

Rick B
 
Don't want currency sign. I have tried playing with format, multiplying by
1 and doing format function, etc. Sometimes it displays correctly in select
statement, but it never actually displays as x.xxx when I export to text
file. I have to have it display the 3 places to right of decimal in the
text extract for loading into another system

The Export function ignores the format and mask properties of a field.
What you'll need to do is create a query with a calculated field:

ExpMyNumber: Format([MyNumber], "#.000")

to explicitly convert the number to a formatted text string, and
export that.

John W. Vinson[MVP]
 
Thanks John. That worked exactly as I wanted for a .txt export. I will be
sure to save your note for the next time it comes up so that I will be able
get it done without any trouble.

Thanks,

c-

John Vinson said:
Don't want currency sign. I have tried playing with format, multiplying by
1 and doing format function, etc. Sometimes it displays correctly in select
statement, but it never actually displays as x.xxx when I export to text
file. I have to have it display the 3 places to right of decimal in the
text extract for loading into another system

The Export function ignores the format and mask properties of a field.
What you'll need to do is create a query with a calculated field:

ExpMyNumber: Format([MyNumber], "#.000")

to explicitly convert the number to a formatted text string, and
export that.

John W. Vinson[MVP]
 
Thanks, I had the same question today and found the answer in newsgroups! Mary

John Vinson said:
Don't want currency sign. I have tried playing with format, multiplying by
1 and doing format function, etc. Sometimes it displays correctly in select
statement, but it never actually displays as x.xxx when I export to text
file. I have to have it display the 3 places to right of decimal in the
text extract for loading into another system

The Export function ignores the format and mask properties of a field.
What you'll need to do is create a query with a calculated field:

ExpMyNumber: Format([MyNumber], "#.000")

to explicitly convert the number to a formatted text string, and
export that.

John W. Vinson[MVP]
 
Back
Top