how to convert the integer [70] to [.70]?

advertisements

How to convert a whole number into decimal..For example 70 to .70 because there are some price in my system that needed to be calculated by grams for example $5 per grams... I am saving the price in my database as an integer..

Thank's for dropping by


I didn't use vb for a long time, but, I guess, simple float division will work

Dim number As Integer
Dim result As Decimal

number = 70
result = number / 100.0