# Order list on date

**URL:** <https://community.glideapps.com/t/order-list-on-date/852>\
**Category:** Report a Bug\
**Created:** [October 3, 2019, 9:59am UTC](https://community.glideapps.com/t/order-list-on-date/852 "2019-10-03T09:59:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olivier\_Gibier](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/olivier_gibier/32/197_2.png) [@Olivier\_Gibier](https://community.glideapps.com/u/Olivier_Gibier)\
**Post date:** [October 3, 2019, 9:59am UTC](https://community.glideapps.com/t/order-list-on-date/852/1 "2019-10-03T09:59:31Z")

</div>

My app’s URL: [https://ghoij.glideapp.io](https://ghoij.glideapp.io)

In my app, the first tab is a list order by date descending and the second is the same datas in a calendar order by date descending.  
My can note that the order is not the same between both.  
Thank’s for your help.

---

<div class="post-metadata">

**Author:** ![Carlos](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos/32/456_2.png) [@Carlos](https://community.glideapps.com/u/Carlos)\
**Post date:** [October 3, 2019, 12:26pm UTC](https://community.glideapps.com/t/order-list-on-date/852/2 "2019-10-03T12:26:53Z")

</div>

I think Glide is interpreting the data on your first sheet as text and not as date. And I think it’s due to the component you chose to display your date.

---

<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:** [October 3, 2019, 12:35pm UTC](https://community.glideapps.com/t/order-list-on-date/852/3 "2019-10-03T12:35:31Z")

</div>

The second tab works because the calendar view knows to convert the value to a date value for the calendar view and knows how to sort it. In the first tab, a list treats all columns as a character and only knows how to sort as character string (and in some cases, a numeric value). You are attempting to sort essentially a character string. It’s not treated like a date the way calendar view works. In your case, from left to right 1 comes before 9 just like a comes before b. When you sort the list view, it sorts left to right as alphanumeric. To properly sort a date in this way, it needs to be in YYYYMMDD format.

---

<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:** [October 3, 2019, 12:40pm UTC](https://community.glideapps.com/t/order-list-on-date/852/4 "2019-10-03T12:40:29Z")

</div>

> **[How to Use the Text Function in Google Sheets \[Format Date and Number\]](https://infoinspired.com/google-docs/spreadsheet/how-to-use-the-text-function-in-google-sheets/)**
>
> Normally I am using the Text Function in Google Sheets to change the date format. But you can format number and time too using this function. Also, knowingly or unknowingly, you are using the text function in the Query in Google Sheets. Formatting...

---

<div class="post-metadata">

**Author:** ![Olivier\_Gibier](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/olivier_gibier/32/197_2.png) [@Olivier\_Gibier](https://community.glideapps.com/u/Olivier_Gibier)\
**Post date:** [October 3, 2019, 2:06pm UTC](https://community.glideapps.com/t/order-list-on-date/852/5 "2019-10-03T14:06:05Z")

</div>

Thank’s for you help. I solved it with 2 new colums, one for the sort and a second for the display (european format)

- first formula : =arrayformula(if(isblank(A2:A);"";text(A2:A;“YYYYMMDD-HHMMSS”)))
- second formula : =arrayformula(if(isblank(A2:A);"";text(A2:A;“DD/MM/YYYY-HH:MM:SS”)))

I keep this app online for helping others users with the same trouble.
