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!

Display only the first three digits !!

Status
Not open for further replies.

sarah77

Programmer
Jun 4, 2002
36
0
0
US
If i've a numeric fields with (1.753781) value so how can I display or treat with only the first three decimal digits to be (1.753) without any ROUNDATION ??.


Thanks for any help sent
 
HI
Use the following fomat. The key is to use the picture clause.

? VARiable1 PICT "99999999.999"

Hope this helps you :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Well, it's rather complex, but try this:
Code:
nNum=1.753781
cNum=STR(nNum,10,10)
nFinalNum=VAL(LEFT(cNum,AT('.',cNum)+3))
 
Try ((int(###*1000))/1000) where ### is your number.
 
Thanks for all of you ....
Ramani solution works only for display
Chpicker and Marsh solutions works for display and for any process suh as * / - +

Thanks for all of you
 
I like Marsh's solution better, myself. It makes more sense and is a LOT less complex than mine. :eek:)

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top