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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need an update query to reformat/convert data in table

Status
Not open for further replies.

spyder

Technical User
Jan 10, 2001
21
0
0
US
I need a query to reformat/convert salary data that has been entered as text as 4050092 (which represents $40,500.92) into 40500.92, but keeping it as a text format. Basically, I need something that would take a cell's data, count over two places from the end (right), and insert a decimal point. Any suggestions?

--spyder
 
This should do it
Right([textfield],Len([textfield])-2) & "." & Left([textfield],2)

replace ["textfield"] with your field name
 
Nice try, but, unfortunately, it didn't work. What that query did was take the first two numbers in a field, add them to the end of the field and place a decimal point before them (e.g. 12345678 became 345678.12)

If you have any other ideas, throw them my way. I have a query that does the job right now...however, I have to run it twice and modify it in between each run. That's not as efficient as I want to be.
 
Sorry not sure what I was thinking at the time. Just reverse the left and right functions.
Left([textfield],Len([textfield])-2) & "." & Right([textfield],2)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top