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

Changing last 2 digits to a decimal

Status
Not open for further replies.

famousb

Programmer
Mar 2, 2000
239
US
Is there a way (which is a stupid way to start because i'm pretty sure there is) to convert the last two digits of a number into two decimal spots?<br>ie.&nbsp;&nbsp;1000 becomes 10.00<br><br>i thought i could do it through the import wizard, but can't seem to figure that out.&nbsp;&nbsp;i'm just as open to code that i can run after the fact.<br><br>thanks. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Create a field that is type numeric named Result and set properties to Format = Fixed, Decimal places = 2, then write a query to multiply it by .01 (or divide by 100). Should work whether the input is text or numeric.<br><br>UPDATE Table1 SET Table1.Result = [Table1].[FieldName]*0.01;
 
ok, now that i read your answer i have to vote for myself for having the stupidest question of all time.&nbsp;&nbsp;i guess sometimes the obvious can be overlooked.<br><br>thanks again elizabeth <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Naw, I think I've got the &quot;stupidest&quot; award all tied up with one of my <i><b>answers<b></i>. <br><br>:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top