place decimal in integer field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a .txt doc I am importing into access. There is a dollar field that
comes over without the decimal (i.e. 45623 instead of 456.23). The field
carries zeros if the cents are zeros. How can I update the imported data
with the decimal in the second position from the end. I tried a mid function
with a negative but it didn't work. Thanks.
 
In this field numeric then try
[FieldName]/100

If the field is text, then try
Val([FieldName])/100
 
I have a .txt doc I am importing into access. There is a dollar field that
comes over without the decimal (i.e. 45623 instead of 456.23). The field
carries zeros if the cents are zeros. How can I update the imported data
with the decimal in the second position from the end. I tried a mid function
with a negative but it didn't work. Thanks.

Divide by 100.


John W. Vinson [MVP]
 
I have a .txt doc I am importing into access. There is a dollar field that
comes over without the decimal (i.e. 45623 instead of 456.23). The field
carries zeros if the cents are zeros. How can I update the imported data
with the decimal in the second position from the end. I tried a mid function
with a negative but it didn't work. Thanks.

Correction to my previous answer.

If you have this in an Integer field, you CANNOT have decimals. An Integer is,
by definition, a whole number.

Use a Currency datatype instead of Number... *then* divide by 100.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top