|
|
| Author |
Message |
prasanth_urs
New User
Joined: 04 Dec 2006 Posts: 28 Location: Pune,India
|
|
|
|
Hi all,
Is there any function to remove the trailing zeros or blanks from a numeric filed.
For eg:-
A = 1067000000
I need to format A to B such a way that B should contain 1067 only.
Please let me know ASAP.
Many Thanks in advance. |
|
| Back to top |
|
 |
References
|
Posted: Tue Apr 17, 2007 4:15 pm Post subject: Re: How to remove the triling zeros and balnks |
 |
|
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2443 Location: italy
|
|
|
|
Just a philosophical remark ....
usually in numbers trailing zeros have some meaning;
are You treating them as plain strings or You want to keep them as numbers,
just a curiosity
regards
P.S.
It happened quite often during my career as consultant that asking this kind of apparently "off topic" questio helped to clarify the issue being discussed |
|
| Back to top |
|
 |
prasanth_urs
New User
Joined: 04 Dec 2006 Posts: 28 Location: Pune,India
|
|
|
|
Hi ,
I got your point. But i need to remove the trailing zeros to make it in a different format.
If you know how to remove this,please let me know. |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 2970 Location: Tucson AZ
|
|
|
|
Reference modification and single byte testing from rear to front.
The intrinsic function REVERSE and maybe NUMVAL or examine replacing.
A simple move.
Byte-wise data manipulation is not that hard. |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6943 Location: 221 B Baker St
|
|
|
|
Hello,
Will the fieldA always have the same number of trailing zeros?
If it does, you could divide by the appropriate power of 10 and get the result you want. In your example, a divide by 1000000 (if i counted zeros correctly ) would get the 1067. |
|
| Back to top |
|
 |
|
|