# Switch node not Consistent

**URL:** <https://discourse.nodered.org/t/switch-node-not-consistent/11908>\
**Category:** General\
**Created:** [6 June 2019 09:27 UTC](https://discourse.nodered.org/t/switch-node-not-consistent/11908 "2019-06-06T09:27:40Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [18 September 2021 09:34 UTC](https://discourse.nodered.org/t/switch-node-not-consistent/11908/21 "2021-09-18T09:34:47Z")

</div>

> [@mocoloco69](#):
>
> 1 should still be less than 10, right?

err - no ... string wise you are comparing 1m with 10 and in the ascii table for characters the value for 0 comes before m so 10 is less than m... etc... You must convert them to real numbers if you want to do real maths.

---

<div class="post-metadata">

**Author:** ![mocoloco69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mocoloco69/32/48193_2.png) [@mocoloco69](https://discourse.nodered.org/u/mocoloco69)\
**Post date:** [18 September 2021 09:43 UTC](https://discourse.nodered.org/t/switch-node-not-consistent/11908/22 "2021-09-18T09:43:58Z")

</div>

OK. That makes sense. No wonder why I was confused. I just converted everything to milliseconds and it seems to be working. Thank you for explaining. I'm not very good with programming and understanding strings versus numbers. Especially when the string contains numbers. Numbers need to be treated as numbers. Got it. I'll remember that. 😆

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 October 2021 09:44 UTC](https://discourse.nodered.org/t/switch-node-not-consistent/11908/23 "2021-10-02T09:44:33Z")

</div>

Closed on 2 October 2021 09:44 UTC

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

[Previous page](https://discourse.nodered.org/t/switch-node-not-consistent/11908.md?page=1)
