Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

division

Status
Not open for further replies.

leonepaolo

Programmer
May 28, 2001
82
0
0
CA
Hi!

I'm sure this is real easy.

When I divide two numbers, or have a decimal number, I only want the digits to the left of the decimal. Aside from:

Left(MyDecimalNumber, InStr(1, MyDecimalNumber, ".")

is there a more mathematical way of doing this?

Please note that I'm not looking to round the number.

Thanks in advance,
Paolo.
 
Or use integer division - use the backslash instead of forward slash:

10/3 = 3.33333333333333
10\3 = 3

Ed Metcalfe

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top