place decimal in integer field

A

Atchleykl

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.
 
O

Ofer Cohen

In this field numeric then try
[FieldName]/100

If the field is text, then try
Val([FieldName])/100
 
J

John W. Vinson

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]
 
J

John W. Vinson

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]
 
Top