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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to trucate a value

Status
Not open for further replies.

mbair

Programmer
Aug 13, 2003
22
US
I have some code that puts out a value like 1.2 or 12.7 and I only want the part before the decimal. How do I truncate it.
 
You might want to take a look at the Fix function.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
try using the round function on the variable

ie newnumber = round(VariableX,0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top