Format a number to two decimal places only (discarding the rest)?

peskywinnets

Registered User.
Local time
Today, 21:04
Joined
Feb 4, 2014
Messages
587
What function/formula should I use to limit a number to TWO decimal places (I don't want to round), example


3.713 ...I only want 3.71

25.8576 ...I only want 25.85

thanks in advance
 
Hi. Try
Code:
Int(25.8576*100)/100
 
Find the decimal point with Instr and add 2 to that value and use the Left function with that value.?

Code:
tt=25.8781
? instr(tt,".")
 3 
? left(tt,instr(tt,".")+2)
25.87
You might need to convert back to numeric?
 

Users who are viewing this thread

Back
Top Bottom