Eleven Twelfths :)

SteveF

Registered User.
Local time
Today, 03:00
Joined
Jul 13, 2008
Messages
218
I have a stock control database and am starting to want to tweak it a little. We often work in dozens and have always rounded up or rounded down so that our closing stock will go to one decimal place, 23 would be entered as 2.0 while 22 would be 1.9

What I would like to be able to do is express 23 as 1.11 and 20 as 1.8 but I also need my DB to understand the the 1 is a whole unit and the 11 is 11 12ths of that unit. I've seen apps that work this way, but I'm blessed if I can figure out how they do it.

Any help appreciated.
 
Steve,

Given a quantity called intStocks, return TheNumber.

TheNumber = CStr(Int(intStocks/12)) & "." & CStr(intStocks Mod 12)

At least I think that is it. I converted the final result to a string,
but it could very well be a floating point number.

Wayne
 
I will give that a go, thanks.
 

Users who are viewing this thread

Back
Top Bottom