# Group by Timestamp Problems

**URL:** <https://community.glideapps.com/t/group-by-timestamp-problems/13766>\
**Category:** Report a Bug\
**Created:** [August 9, 2020, 1:53am UTC](https://community.glideapps.com/t/group-by-timestamp-problems/13766 "2020-08-09T01:53:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![spencersRus](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencersrus/32/69_2.png) [@spencersRus](https://community.glideapps.com/u/spencersRus)\
**Post date:** [August 9, 2020, 1:53am UTC](https://community.glideapps.com/t/group-by-timestamp-problems/13766/1 "2020-08-09T01:53:18Z")

</div>

I am working on an app where students can share what they learned today.  
Here is a link to the current prototype: [https://right-stomach-4836.glideapp.io/](https://right-stomach-4836.glideapp.io/)

The form writes to the sheet with the current date and the new user given insight.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/ee3d4c393c2f37b7eb78711a15dd471ad0585374.png)

But, when I try to “GROUP” the learning by DATE, it splits it up. (Because in the background it is actually the date AND the TIME (so the app sees each as a different “date”)  
You can see, I even changed the DATE format to just the date.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/e4012b93604e452d83afee7aa48bb9d4d2ed9b37.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/f/fb7be911438eae5aa92a01706a1e222e9fd218a4.png)

Any thoughts?

---

<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:** [August 9, 2020, 2:09am UTC](https://community.glideapps.com/t/group-by-timestamp-problems/13766/2 "2020-08-09T02:09:21Z")

</div>

Yeah as you said, in the background it still is the full package of date & time so there lies the problem.

To fix this, Glide needs to allow us to choose what to write to the Sheet in the datetime component in the form, like the formats they allow in the datetime column.

For now, your best bet is to convert that to a date only value in the Sheets using an arrayformula.

---

<div class="post-metadata">

**Author:** ![spencersRus](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencersrus/32/69_2.png) [@spencersRus](https://community.glideapps.com/u/spencersRus)\
**Post date:** [August 9, 2020, 2:11am UTC](https://community.glideapps.com/t/group-by-timestamp-problems/13766/3 "2020-08-09T02:11:33Z")

</div>

> [@ThinhDinh](#):
>
> For now, your best bet is to convert that to a date only value in the Sheets using an arrayformula.

Ohhh… tell me more … what would an array formula look like?  
(maybe this should be in Spreadsheet Magic)

---

<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:** [August 9, 2020, 2:11am UTC](https://community.glideapps.com/t/group-by-timestamp-problems/13766/4 "2020-08-09T02:11:57Z")

</div>

Let me quickly make an example in my sheet and share with you.

---

<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:** [August 9, 2020, 2:16am UTC](https://community.glideapps.com/t/group-by-timestamp-problems/13766/5 "2020-08-09T02:16:36Z")

</div>

> **[ThinhDinh's Glide Lab](https://docs.google.com/spreadsheets/d/1sEQHpSKyHx9w2F_Xx3lm56SU1p-8eI81OYU5TYvQFvw/edit#gid=870147142)**
>
> Dynamic column names
> 
> ID,Item 1,Item 2,Item 3,Item 4,Item 5,,,,,,,,,,,,,,
> A
> B
> C,AE,AF,AG,AH
> D,AB,AC,AD
> E,EI,EJ,EK,BA,SA
> F

I used a combination of TO\_DATE and INT in cell B1 to convert the datetime to date (and appropriate formatting inside the Sheets). Let me know if it works for your case.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [August 9, 2020, 2:58am UTC](https://community.glideapps.com/t/group-by-timestamp-problems/13766/6 "2020-08-09T02:58:31Z")

</div>

I would maybe try creating a template column to store the formatted date. Then group by the template column. Seems to work for most other things like math and number columns that have precision set.

---

<div class="post-metadata">

**Author:** ![spencersRus](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencersrus/32/69_2.png) [@spencersRus](https://community.glideapps.com/u/spencersRus)\
**Post date:** [August 9, 2020, 3:16am UTC](https://community.glideapps.com/t/group-by-timestamp-problems/13766/7 "2020-08-09T03:16:23Z")

</div>

Wow, that worked… I guess the template just reads what is in the cell and ‘turns it into’ just that text?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [August 9, 2020, 3:19am UTC](https://community.glideapps.com/t/group-by-timestamp-problems/13766/8 "2020-08-09T03:19:32Z")

</div>

It appears so. I’ve used that hack quite a bit with math and number columns.
