# Différence de tri entre date et date + time

**URL:** https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390
**Category:** Ask for Help
**Created:** [April 17, 2025, 11:17am UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390 "2025-04-17T11:17:27Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 17, 2025, 11:17am UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/1 "2025-04-17T11:17:27Z")

</div>

Bonjour,

J’ai une soucis lor de la creation de “Collection”  
J’ai deuux champs avec date.

- START (Longue date et Time)
- DATE (long date sans time)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/b/0b43a1986280cf88e9db3790fac5d53704194446.png)

Dans la Collection, je souhait trier sur DATE et grouper sur DATE  
Mais si je trie sur DATE , l’ordre est sur le numero jour de la date. 01, 02, 03

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/0/a0f213c506d0b6c3db608d8a21ccfe37b2c9f41f.png)

Si je trie sur START et groupe sur DATE, le tri est correct

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/1/a1f518268c5b9ab6d6123340c068d4dcf389348f.png)

Les deux champs sont de type DATE.

Comment trier sur DATE pour obtenir un tri correct comme sur START ?

Merci

---

<div class="post-metadata">

### Author: ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)
#### Post date: [April 17, 2025, 12:07pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/2 "2025-04-17T12:07:23Z")

</div>

Pouvez-vous me montrer votre configuration de filtres, groupes et tris svp?

---

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 17, 2025, 1:33pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/3 "2025-04-17T13:33:43Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/3/b3ff0464dbfff452e004e16657216e5f365ba04d.png)

---

<div class="post-metadata">

### Author: ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)
#### Post date: [April 17, 2025, 1:57pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/4 "2025-04-17T13:57:07Z")

</div>

Je pense que date sans time cause problème et semble considéré comme du simple texte.  
Essayez de créer une colonne formater date pointant vers START en affichant date et temps. Utilisez cette colonne comme tri.

---

<div class="post-metadata">

### Author: ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)
#### Post date: [April 17, 2025, 2:01pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/5 "2025-04-17T14:01:08Z")

</div>

> [@Alain\_Boufler](#):
>
> ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/b/0b43a1986280cf88e9db3790fac5d53704194446.png)
> 
> image406×260 39 KB

Je me demande :

1. Pourquoi vous avez 3 colonnes ? Est-ce nécessaire ?
2. Comment la donnée se retrouve dans ces trois colonnes (à la main, 3 composants de saisie de dates) ?

---

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 17, 2025, 2:23pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/6 "2025-04-17T14:23:37Z")

</div>

DATE et START sont des champs de type DATE

---

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 17, 2025, 2:25pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/7 "2025-04-17T14:25:41Z")

</div>

En classic, j’utilisais “Start” , j’ai du migrer.  
J’en profite pour séparer dates et heures, car j’ai besoin d’afficher l’heure seule.  
SI le tri fonctionne correctement, je supprimerai “start”

---

<div class="post-metadata">

### Author: ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)
#### Post date: [April 17, 2025, 2:38pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/8 "2025-04-17T14:38:02Z")

</div>

Oui, je sais, mais essayez la colonne de formatage. J’ai déjà eu des problèmes comme ça.

---

<div class="post-metadata">

### Author: ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)
#### Post date: [April 17, 2025, 2:39pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/9 "2025-04-17T14:39:13Z")

</div>

Vous pouvez simplement utiliser une colonne format date pour n’afficher que l’heure. Cela vous permettra de n’avoir qu’une seule colonne date et heure et de séparer date/heure en deux colonnes format 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: [April 17, 2025, 2:56pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/10 "2025-04-17T14:56:01Z")

</div>

A math column is going to be a lot more reliable across different regions and devices compared to a date format column.

---

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 17, 2025, 3:07pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/11 "2025-04-17T15:07:24Z")

</div>

Hi Jeff,  
How to get the “start” day in MATH ?

---

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 17, 2025, 3:08pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/12 "2025-04-17T15:08:22Z")

</div>

Pour cela je dois extraire l’heure de “start”. En Glide, je ne vois pas comment faire.

---

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 17, 2025, 3:23pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/13 "2025-04-17T15:23:34Z")

</div>

> [@MaximeBaker](#):
>
> Vous pouvez simplement utiliser une colonne format date pour n’afficher que l’heure. Cela vous permettra de n’avoir qu’une seule colonne date et heure et de séparer date/heure en deux colonnes format date.

C’est ce que j’essaie de faire, mais je tri de a nouvelle colonne (DATE) n’est pas correct.  
Je crois qu’il s’agit d’un bug de chez Glide

---

<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: [April 17, 2025, 4:30pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/14 "2025-04-17T16:30:16Z")

</div>

The math column can be used to get a date formated differently using the same date value in another column. If you enter a simple value, such as ’date’ into the math formula and then replace it with your existing date column, it will then allow you to format that date with date only or time only.

The reason I suggest the math column instead of the date format column is because there are known issues with the date format column not working for everyone and also presents the date as text, so it can only be formatted alphabetically instead of sorting in date order. A math column should keep the date as an actual date which can be sorted as a date.

It also should be known that formatting a date column only changes it’s forward appearance. The underlying value is still a full date and time, and I believe sorting looks at that full date and time.

You should only need your Start date column and two math columns to present that date as date only and time only. Use the math columns any time you want to display that value.

You should be able to sort your collection using the Start column. As for grouping, you may need to add a template column to convert a formatted date or math column into text so so it only groups by the formatted value instead of the full underlying date value.

---

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 21, 2025, 1:47pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/15 "2025-04-21T13:47:13Z")

</div>

> [@Jeff\_Hager](#):
>
> he math columns any time you w

Thanks a lot Jeff.

The source (Time) is :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/b/db7a7c541c7b0248360ecfa7a3e318d3927678b7.png)  
(in french)

Get hour :  
In a MATH : Hour(Time) + (Minute(Time)/100)  
ok; result is : 17,00 (with a comma)

Get date :  
I can try this :  
(day(date)\*100000)+(month(date)\*10000)+(year(date))  
but, I can’t use this result.  
Result : “142025”

I expect :  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/8/f8c12462fa0194388b7d22051494396d86d7aae9.png)

There certainly a beter way 😉 Isn’t ?

---

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 21, 2025, 1:48pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/16 "2025-04-21T13:48:10Z")

</div>

> [@Jeff\_Hager](#):
>
> You should be able to sort your collection using the Start column. As for grouping, you may need to add a template column to convert a formatted date or math column into text so so it only groups by the formatted value instead of the full underlying date value.

Thanks

---

<div class="post-metadata">

### Author: ![Alain\_Boufler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alain_boufler/32/57427_2.png) [@Alain\_Boufler](https://community.glideapps.com/u/Alain_Boufler)
#### Post date: [April 22, 2025, 9:23pm UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/17 "2025-04-22T21:23:55Z")

</div>

SOLUTION :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/c/7c4dc3cc0cb8064855b01f0097828c194a7cd26c.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: [April 23, 2025, 12:21am UTC](https://community.glideapps.com/t/difference-de-tri-entre-date-et-date-time/81390/18 "2025-04-23T00:21:10Z")

</div>

Couldn’t you use the result here to sort?

> [@Alain\_Boufler](#):
>
> Get date :  
> I can try this :  
> (day(date)\*100000)+(month(date)\*10000)+(year(date))  
> but, I can’t use this result.  
> Result : “142025”

The format date column might work for you now, but it’s known to be unreliable. However if you’re only displaying it as text, it might not be that much of a problem.
