PDA

View Full Version : Adding a decimal point to a numeric field



Peter
October 16th, 2003, 11:50 AM
Hi,

I have a report that has 7 digit field. I would like to add a decimal after the 5th digit. I want to keep the field numeric because I need to add the columns.
Examples:

9999999
0840432
2109503

I would like it to look like this:

99999.99
08404.32
21095.03

Anybody have any suggestions.
Thanks
Peter

Todd Niemi
October 16th, 2003, 11:56 AM
Ralph's right, Peter.

Create a calculated field. When doing so, specify a "2" in the Decimals field on the Field Properties dialog's General tab. Then, on the Formula tab, create a calculated field expression. For example, if the field you want to add a decimal to is called Cost, you could use the following expression:

[Cost]*.01

Hope this works for you.

[ October 16, 2003, 11:22 AM: Message edited by: Todd Niemi ]

RalphB
October 16th, 2003, 12:12 PM
Peter, The only way I know to to this is to create a calculated field and divide the field by 100, or if you wish, multiply the field by 0.01. Either way, you should get the same result.


Originally posted by Peter:
Hi,

I have a report that has 7 digit field. I would like to add a decimal after the 5th digit. I want to keep the field numeric because I need to add the columns.
Examples:

9999999
0840432
2109503

I would like it to look like this:

99999.99
08404.32
21095.03

Anybody have any suggestions.
Thanks
Peter

Peter
October 16th, 2003, 02:31 PM
Worked great.

Thanks
Peter