RTRIM 仅最后 3 位数字
我有一个数字,我想修剪最后 3 位数字,它们总是零,但是对于这个数字,我有四个零,如果我使用 rtrim 删除零,它会删除其中的四个零。下面是示例
rtrim(15,250,000 ,“0”)
我想要的是仅删除最后三个零,
谢谢..
I have a figure to and i want to trim the last 3 digits which are always zeros,but for this one i have four zeros and if i use the rtrim to remove the zeros it removes four of them.Below is and example
rtrim(15,250,000,"0")
what i want is to remove only the last three zeros
thank you..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果它始终是一个数字,那么将其保留为数字而不是字符串并简单地除以 1000 怎么样?
If it's always a number how about keeping it as a number instead of a character string and simply dividing by 1000?
如果它们始终为零,那么简单地保留从字符串开头开始并延伸到字符串长度减去三个字符的子字符串怎么样?
If they are always zeroes, how about simply keeping the substring that starts at the beginning of the string and extends to the length of the string minus three characters?