# Separate units, tens, hundreds

**URL:** <https://forum.xod.io/t/separate-units-tens-hundreds/1280>\
**Category:** Uncategorized\
**Created:** [October 28, 2018, 2:48am UTC](https://forum.xod.io/t/separate-units-tens-hundreds/1280 "2018-10-28T02:48:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [October 28, 2018, 2:48am UTC](https://forum.xod.io/t/separate-units-tens-hundreds/1280/1 "2018-10-28T02:48:46Z")

</div>

Hi, need to separate units, tens, hundreds.  
What nodes should I use?

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [October 28, 2018, 4:40pm UTC](https://forum.xod.io/t/separate-units-tens-hundreds/1280/2 "2018-10-28T16:40:03Z")

</div>

Original # modulo 10 will give you units position. Divide original # by 10 and modulo 10 to get tens position. Repeat for as many positions as needed.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [October 28, 2018, 7:24pm UTC](https://forum.xod.io/t/separate-units-tens-hundreds/1280/3 "2018-10-28T19:24:06Z")

</div>

thanks @gweimer, now I have another problem 🙂 , how do I eliminate decimals or in another case how can I use only decimals?

Edit: I only want to show 1 digit, and I can not find a way to select it, for example first 2 then 5 and then 6

![digit](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/09a0fbe6e714b1b9a9c6923ead8f34e86eb1f248.png)

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [October 28, 2018, 11:15pm UTC](https://forum.xod.io/t/separate-units-tens-hundreds/1280/4 "2018-10-28T23:15:58Z")

</div>

You can use the modulo node as I mentioned before, or you can use the floor node to drop the decimal part of the number (assuming it is a positive number).

Replacing the format nodes in your patch above with modulo nodes (2nd pin set to “10”) should give you what you want. Modulo node says it rounds toward zero, so floor node should not be needed.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [October 28, 2018, 11:51pm UTC](https://forum.xod.io/t/separate-units-tens-hundreds/1280/5 "2018-10-28T23:51:14Z")

</div>

![digit](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/e9a1ea42875dc73c3cba8bbdd5d300a0352c6fc7.png)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [October 30, 2018, 11:51pm UTC](https://forum.xod.io/t/separate-units-tens-hundreds/1280/6 "2018-10-30T23:51:15Z")

</div>

Closed on October 30, 2018, 11:51pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
