# New row added, time format not respected

**URL:** <https://community.glideapps.com/t/new-row-added-time-format-not-respected/20180>\
**Category:** Ask for Help\
**Created:** [December 22, 2020, 3:40pm UTC](https://community.glideapps.com/t/new-row-added-time-format-not-respected/20180 "2020-12-22T15:40:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tennesseejet](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tennesseejet/32/18470_2.png) [@tennesseejet](https://community.glideapps.com/u/tennesseejet)\
**Post date:** [December 22, 2020, 3:40pm UTC](https://community.glideapps.com/t/new-row-added-time-format-not-respected/20180/1 "2020-12-22T15:40:25Z")

</div>

![2020-12-22_10-30-22](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/c/4c0fe157d9cc6f26f6fd0529a60751a53931e95f.png)

I’ve got several columns in my sheet that contain arrayformulas that insert times into columns based on form submissions in Glide. For some reason, the formatting of those columns is not being respected when new rows are added.

---

<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:** [December 22, 2020, 3:46pm UTC](https://community.glideapps.com/t/new-row-added-time-format-not-respected/20180/2 "2020-12-22T15:46:14Z")

</div>

I can confirm I face this situation many times when I work with arrayformulas, but what you can do is to use a TEXT formula inside your arrayformula to make it work.

Though from your screenshot, it looks like what you want can be replicated in Glide using the math column.

---

<div class="post-metadata">

**Author:** ![tennesseejet](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tennesseejet/32/18470_2.png) [@tennesseejet](https://community.glideapps.com/u/tennesseejet)\
**Post date:** [December 22, 2020, 11:31pm UTC](https://community.glideapps.com/t/new-row-added-time-format-not-respected/20180/3 "2020-12-22T23:31:40Z")

</div>

ThinhDinh…using the TEXT formula in an array worked. I had to work to get they syntax right. I’m posting a pic and the formulas in case any one else needs this in the future. Thank you so much for the direction!!

**Column R generates current time**  
=ARRAYFORMULA(if(ISBLANK(B2:B), “”,now()))

**Column S adds 5 minutes to current time**  
=ARRAYFORMULA(if(ISBLANK(B2:B), “”,R2:R+0.00347222222))

**Column T adds 1.5 hours to current time**  
=ARRAYFORMULA(if(ISBLANK(B2:B), “”,R2:R+0.06249999996))

**Columns U-W convert each of those columns to text**  
=ARRAYFORMULA(if(ISBLANK(B2:B), “”,TEXT(R2:R,“h:mm AM/PM”))  
=ARRAYFORMULA(if(ISBLANK(B2:B), “”,TEXT(S2:S,“h:mm AM/PM”)))  
=ARRAYFORMULA(if(ISBLANK(B2:B), “”,TEXT(T2:T,“h:mm AM/PM”)))

 ![array formulas for time](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/9/393538790d672edff819322ef28402f09abaf4a7.png)

---

<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:** [December 23, 2020, 3:00am UTC](https://community.glideapps.com/t/new-row-added-time-format-not-respected/20180/4 "2020-12-23T03:00:20Z")

</div>

Excellent work! You can move the arrayformula to the header though, to make sure you won’t somehow forget about it and delete line 2 😉

I wrote about it here.

> [@Tutorial: Arrayformula in Google Sheets, good practices & how to overcome Arrayformula restrictions with scripts](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727):
>
> Hi, Today I will show you the script that can make copying formulas down work, when it does not work with arrayformula. But first, let’s have some introductions about arrayformula, for those who has not used this before in Google Sheets, some equivalents in Glide and some good practices while using it. I hope it can help you in building your Glide apps as well as applying it in your normal day job. 
> 
> > **1/ Definition**
> >
> > Arrayformula is defined as “a range, mathematical expression using one cell range …
