Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Number Of Decimals In A Text Field

Status
Not open for further replies.

DataChick

IS-IT--Management
Apr 17, 2002
108
US
I am completely stumped and have no idea where to start.

Here is my issue:

I have a field that houses prices BUT I HAVE to have the field set as a text field because it has to export to a csv file WITH quotes around it (as text) BUT I also need to make sure that it's formatted to 5 decimal places.

What I would like to be able to do is count the number of characters AFTER the decimal point and add the appropriate amount of zeros (since my numbers will never have more than 5 decimals places) but I don't know how to have it count to the right of a specific character.

Does anyone have any ideas???

Thank you in advance.

Datachick

"The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents."
-Nathaniel Borenstein
 
Hi

Have the column in the table as a number type

Make a query based on the table, in the table have a calculated column Price:Format(nPrice,"0000.00000")

export the query

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top