Convert 600 to 6.00

dcollins

Registered User.
Local time
Today, 03:24
Joined
Nov 24, 2003
Messages
30
How can I convert a field from another database to include a decimal point. For example, 7983 should be 79.83. This seems like it should be very simple but I cannot seem to get it.
Thank you very much.
 
How can I convert a field from another database to include a decimal point. For example, 7983 should be 79.83. This seems like it should be very simple but I cannot seem to get it.
Thank you very much.

How is the data stored? Where do you want to store it?

You just need to divide the number by 1000, however if you are storing this in a table you need to make sure the data type for the field is set to a double. If the value is set to a long integer or less it will not allow decimal points to be stored.
 
Divide

Doesn't it work if you divide things by 100? 7983 / 100 = 79.83

DJKarl (7983 / 1000 is 7.983)

You might be able to use the CDbl function like:
CDbl(TheNumber / 100)
 
I would think you should be able to simply divide by 100 (7983 / 100) =79.83. This should work as long as the output field is a non-integer numeric data type.
 
Thanks for the quick response!
Sorry, I should have included this info in the first message. The data is stored as decimal number, I import it from another DB. My guess is, this is why none of the suggestions above seem to work (haven't fully tested all).
 

Users who are viewing this thread

Back
Top Bottom