# How to convert time to number?

**URL:** <https://community.glideapps.com/t/how-to-convert-time-to-number/41100>\
**Category:** Ask for Help\
**Created:** [April 23, 2022, 12:33am UTC](https://community.glideapps.com/t/how-to-convert-time-to-number/41100 "2022-04-23T00:33:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![phong\_tran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/phong_tran/32/32160_2.png) [@phong\_tran](https://community.glideapps.com/u/phong_tran)\
**Post date:** [April 23, 2022, 12:33am UTC](https://community.glideapps.com/t/how-to-convert-time-to-number/41100/1 "2022-04-23T00:33:17Z")

</div>

how to convert time to number

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 23, 2022, 12:47am UTC](https://community.glideapps.com/t/how-to-convert-time-to-number/41100/2 "2022-04-23T00:47:59Z")

</div>

What kind of number?

---

<div class="post-metadata">

**Author:** ![phong\_tran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/phong_tran/32/32160_2.png) [@phong\_tran](https://community.glideapps.com/u/phong_tran)\
**Post date:** [April 23, 2022, 12:59am UTC](https://community.glideapps.com/t/how-to-convert-time-to-number/41100/3 "2022-04-23T00:59:41Z")

</div>

convert now to total seconds

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 23, 2022, 1:15am UTC](https://community.glideapps.com/t/how-to-convert-time-to-number/41100/4 "2022-04-23T01:15:46Z")

</div>

Total seconds since? 1/1/1970?

---

<div class="post-metadata">

**Author:** ![phong\_tran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/phong_tran/32/32160_2.png) [@phong\_tran](https://community.glideapps.com/u/phong_tran)\
**Post date:** [April 23, 2022, 1:19am UTC](https://community.glideapps.com/t/how-to-convert-time-to-number/41100/5 "2022-04-23T01:19:28Z")

</div>

I get it, thanks

---

<div class="post-metadata">

**Author:** ![Milan\_Balogh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/milan_balogh/32/22918_2.png) [@Milan\_Balogh](https://community.glideapps.com/u/Milan_Balogh)\
**Post date:** [September 25, 2022, 6:38pm UTC](https://community.glideapps.com/t/how-to-convert-time-to-number/41100/6 "2022-09-25T18:38:12Z")

</div>

I’m interested in this too… basically, I want to join a **RowID** with the earliest of the **dates** (just a basic date+time) to create a relation, but I’m not comfortable with joining the time in a text format.  
What would be the best to convert the date-time including millisecs to a reasonably short but stable number or text? Like the UNIX timestamp?

PS: With this, I’m using a cool trick to limit my ledger to max 10 items then the earliest is overwritten…

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 26, 2022, 12:53am UTC](https://community.glideapps.com/t/how-to-convert-time-to-number/41100/7 "2022-09-26T00:53:03Z")

</div>

What I usually do is use a math column to convert it to a numerical form. Something like:

YEAR(T)\*10000+MONTH(T)\*100+DAY(T)

With T being the timestamp in question. That will give me a format of YYYYMMDD.

If you want minutes, hours and seconds, just add the relevant params into the formula.
