# Criteria to sort data exactly the same

**URL:** <https://community.glideapps.com/t/criteria-to-sort-data-exactly-the-same/74293>\
**Category:** Ask for Help\
**Created:** [June 21, 2024, 8:10am UTC](https://community.glideapps.com/t/criteria-to-sort-data-exactly-the-same/74293 "2024-06-21T08:10:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ingenio\_dgtal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ingenio_dgtal/32/64066_2.png) [@Ingenio\_dgtal](https://community.glideapps.com/u/Ingenio_dgtal)\
**Post date:** [June 21, 2024, 8:10am UTC](https://community.glideapps.com/t/criteria-to-sort-data-exactly-the-same/74293/1 "2024-06-21T08:10:18Z")

</div>

Hi! I want to sort the table according a date field. But many rows have the same date, exactly the same date (and time).  
Does anyone know which criteria or method uses Glide to sort after?

I appreciate your support!

---

<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:** [June 21, 2024, 1:00pm UTC](https://community.glideapps.com/t/criteria-to-sort-data-exactly-the-same/74293/2 "2024-06-21T13:00:58Z")

</div>

What’s your second criteria for sorting? Do you know which column you want to use for that secondary sorting?

---

<div class="post-metadata">

**Author:** ![Ingenio\_dgtal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ingenio_dgtal/32/64066_2.png) [@Ingenio\_dgtal](https://community.glideapps.com/u/Ingenio_dgtal)\
**Post date:** [June 24, 2024, 10:50am UTC](https://community.glideapps.com/t/criteria-to-sort-data-exactly-the-same/74293/3 "2024-06-24T10:50:45Z")

</div>

I would like to know which second criteria uses Glide to sort in case the first criteria is exactly the same? Second criteria could be a Company name in a text field.

---

<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:** [June 24, 2024, 12:10pm UTC](https://community.glideapps.com/t/criteria-to-sort-data-exactly-the-same/74293/4 "2024-06-24T12:10:08Z")

</div>

By default it’s probably going to sort by table order after sorting by date. If you want to sort by Date and Company, I would create template column that contains both. But since this will convert the whole thing into text, your date will need to be in a format that can be sorted alphanumericly instead of by date.

First you’ll need a math column to convert the date into a number, like this:

```auto
Year(Date)*10^10
+ Month(Date)*10^8
+ Day(Date)*10^6
+ Hour(Date)*10^4
+ Minute(Date)*10^2
+ Second(Date)

```

Then create a template column that joins the math column and the company column together. Then you can sort by the template column.

---

<div class="post-metadata">

**Author:** ![Ingenio\_dgtal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ingenio_dgtal/32/64066_2.png) [@Ingenio\_dgtal](https://community.glideapps.com/u/Ingenio_dgtal)\
**Post date:** [June 24, 2024, 6:46pm UTC](https://community.glideapps.com/t/criteria-to-sort-data-exactly-the-same/74293/5 "2024-06-24T18:46:16Z")

</div>

Thank you @Jeff_Hager.

I appreciate your help. 👌
