# A number always with two digits as text (formula)

**URL:** <https://forum.seatable.com/t/a-number-always-with-two-digits-as-text-formula/3318>\
**Category:** Formulas\
**Created:** [March 21, 2024, 7:43am UTC](https://forum.seatable.com/t/a-number-always-with-two-digits-as-text-formula/3318 "2024-03-21T07:43:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max](https://forum.seatable.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@Max](https://forum.seatable.com/u/Max)\
**Post date:** [March 21, 2024, 7:43am UTC](https://forum.seatable.com/t/a-number-always-with-two-digits-as-text-formula/3318/1 "2024-03-21T07:43:33Z")

</div>

Hello,  
i get the day of a date in a formula with day().  
i need this number allwas with 2 digits as a text (f.e. “05”)  
i thought, i use ‘text(day(…),“00”)’ but it doesn’t work. I can’t find anything in the documatation.  
Can anybody help me?

---

<div class="post-metadata">

**Author:** ![rdb](https://forum.seatable.com/user_avatar/forum.seatable.com/rdb/32/1869_2.png) [@rdb](https://forum.seatable.com/u/rdb)\
**Post date:** [March 21, 2024, 9:23am UTC](https://forum.seatable.com/t/a-number-always-with-two-digits-as-text-formula/3318/2 "2024-03-21T09:23:05Z")

</div>

> [@Max](#):
>
> ‘text(day(…),“00”)’

This is a bit too simple.

Try this:

if(  
len(day({datecolumn}))=1,  
“0”&day({datecolumn}),  
day({datecolumn})  
)

Then make sure that the result type is recognized as “string”.

---

<div class="post-metadata">

**Author:** ![Max](https://forum.seatable.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@Max](https://forum.seatable.com/u/Max)\
**Post date:** [March 21, 2024, 10:07am UTC](https://forum.seatable.com/t/a-number-always-with-two-digits-as-text-formula/3318/3 "2024-03-21T10:07:25Z")

</div>

OK, I thought it would be simple 🙂  
Thanks for this solution, it works  
Simple formatting with the “text” command might be something for the future

---

<div class="post-metadata">

**Author:** ![rdb](https://forum.seatable.com/user_avatar/forum.seatable.com/rdb/32/1869_2.png) [@rdb](https://forum.seatable.com/u/rdb)\
**Post date:** [March 21, 2024, 10:19am UTC](https://forum.seatable.com/t/a-number-always-with-two-digits-as-text-formula/3318/4 "2024-03-21T10:19:12Z")

</div>

> [@Max](#):
>
> Simple formatting with the “text” command might be something for the future

The purpose of text is different.  
 ![image](https://forum.seatable.io/uploads/default/original/2X/f/fedef006f03b18439d14040add710276e8c2d202.png)

---

<div class="post-metadata">

**Author:** ![system](https://forum.seatable.com/uploads/default/original/1X/04603423fe81a46c321283663086c475429e8ccb.png) [@system](https://forum.seatable.com/u/system)\
**Post date:** [March 23, 2024, 10:19am UTC](https://forum.seatable.com/t/a-number-always-with-two-digits-as-text-formula/3318/5 "2024-03-23T10:19:39Z")

</div>

Closed on March 23, 2024, 10:19am UTC

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