# From a number to hexidecimals

**URL:** <https://community.homey.app/t/from-a-number-to-hexidecimals/7908>\
**Category:** Developers\
**Created:** [January 25, 2019, 10:59am UTC](https://community.homey.app/t/from-a-number-to-hexidecimals/7908 "2019-01-25T10:59:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patrick1/32/10822_2.png) [@Patrick1](https://community.homey.app/u/Patrick1)\
**Post date:** [January 25, 2019, 10:59am UTC](https://community.homey.app/t/from-a-number-to-hexidecimals/7908/1 "2019-01-25T10:59:44Z")

</div>

Hello everyone,

Does anyone know a solution?  
I have a number from a calculation and would like to make a hexadecimal of it, which I can send to my phone for my work.  
Here we use these codes to log in.  
Now I have to calculate it every day and would like to have it sent automatically every day.  
Would this be possible with Math.js?

I hope someone knows a solution.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 25, 2019, 11:06am UTC](https://community.homey.app/t/from-a-number-to-hexidecimals/7908/2 "2019-01-25T11:06:05Z")

</div>

Not sure if you can use JS code, but if so:

```auto
number.toString(16)

```

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [January 26, 2019, 2:31am UTC](https://community.homey.app/t/from-a-number-to-hexidecimals/7908/3 "2019-01-26T02:31:15Z")

</div>

Ive just moved your thread into the developer forum, wouldnt want to scare people with talk of Hexadecimals or math.

---

<div class="post-metadata">

**Author:** ![Patrick1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patrick1/32/10822_2.png) [@Patrick1](https://community.homey.app/u/Patrick1)\
**Post date:** [January 26, 2019, 1:25pm UTC](https://community.homey.app/t/from-a-number-to-hexidecimals/7908/4 "2019-01-26T13:25:23Z")

</div>

Are there any more options within Homey?

Because through the Number. toString(16) can’t do it because Homey doesn’t recognize this option.

Am I doing something wrong or can this denomination not be in Math. js?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 26, 2019, 1:36pm UTC](https://community.homey.app/t/from-a-number-to-hexidecimals/7908/5 "2019-01-26T13:36:50Z")

</div>

There doesn’t seem to be a function or option in Math.js to convert a number to a hexadecimal string ☹

---

<div class="post-metadata">

**Author:** ![Patrick1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patrick1/32/10822_2.png) [@Patrick1](https://community.homey.app/u/Patrick1)\
**Post date:** [January 26, 2019, 1:41pm UTC](https://community.homey.app/t/from-a-number-to-hexidecimals/7908/6 "2019-01-26T13:41:08Z")

</div>

Then just see if an app can be made.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [January 26, 2019, 7:46pm UTC](https://community.homey.app/t/from-a-number-to-hexidecimals/7908/7 "2019-01-26T19:46:13Z")

</div>

I expect it to be possible with Homeyscript.  
Just call the script with the value and set a string variable with the hex value.
