# Sort a bunch of discrete Date Columns to find the Latest Date

**URL:** <https://community.glideapps.com/t/sort-a-bunch-of-discrete-date-columns-to-find-the-latest-date/78644>\
**Category:** Ask for Help\
**Created:** [December 16, 2024, 9:11pm UTC](https://community.glideapps.com/t/sort-a-bunch-of-discrete-date-columns-to-find-the-latest-date/78644 "2024-12-16T21:11:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [December 16, 2024, 9:11pm UTC](https://community.glideapps.com/t/sort-a-bunch-of-discrete-date-columns-to-find-the-latest-date/78644/1 "2024-12-16T21:11:32Z")

</div>

I keep track of the dates for a number of steps in a workflow which is a single entry in a Glide table.

Create Date  
Cancel Date  
Complete Date  
Close Date  
Convert Date  
Latest Note Date

I would like to have a “Last Activity Date” which would be the latest Date from this set of Column data. I can put them all in an Array but not sure if that helps. I could go through a series of “compares/ITE” which would get to an answer. Not sure if there is a better/simpler/more elegant way to accomplish this.

Thanks…

---

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [December 16, 2024, 9:55pm UTC](https://community.glideapps.com/t/sort-a-bunch-of-discrete-date-columns-to-find-the-latest-date/78644/2 "2024-12-16T21:55:26Z")

</div>

Not sure if this is optimal but it beats comparing a bunch of Dates against each other.

MakeArray() - Array can have 1 - 6 elements  
SortArray() - seems to sort A-Z  
ReverseArray() - gets latest date as the first item  
SingleValue() - pulls the first/‘latest’ date  
FormatDate() - make it pretty

Seems to work…

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [December 16, 2024, 10:21pm UTC](https://community.glideapps.com/t/sort-a-bunch-of-discrete-date-columns-to-find-the-latest-date/78644/3 "2024-12-16T22:21:21Z")

</div>

I’d do this:

1. convert Dates to a Number or Text using format “yyyymmdd” using a new Column (e.g. “newDate”). If your main goal is to know the latest or newest date, your conversion should be as a Number
2. Create a Rollup pointing to “newDate” column and select Minimum/ Maximum option to get what you want
3. Create an ITE column to compare “newDate” column value with Minimum/ Maximum value found by your Rollup. If there is a match write “true” to mark a result.

Saludos!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 16, 2024, 10:50pm UTC](https://community.glideapps.com/t/sort-a-bunch-of-discrete-date-columns-to-find-the-latest-date/78644/4 "2024-12-16T22:50:13Z")

</div>

> [@MattLB](#):
>
> MakeArray() - Array can have 1 - 6 elements  
> SortArray() - seems to sort A-Z  
> ReverseArray() - gets latest date as the first item  
> SingleValue() - pulls the first/‘latest’ date  
> FormatDate() - make it pretty

You could skip most of those steps by using Rollup-\>Latest on your Makearray column 😉

---

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [December 16, 2024, 10:53pm UTC](https://community.glideapps.com/t/sort-a-bunch-of-discrete-date-columns-to-find-the-latest-date/78644/5 "2024-12-16T22:53:56Z")

</div>

Mic drop…

---

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [December 16, 2024, 10:56pm UTC](https://community.glideapps.com/t/sort-a-bunch-of-discrete-date-columns-to-find-the-latest-date/78644/6 "2024-12-16T22:56:42Z")

</div>

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

Easy…Peasy

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [December 23, 2024, 10:57pm UTC](https://community.glideapps.com/t/sort-a-bunch-of-discrete-date-columns-to-find-the-latest-date/78644/7 "2024-12-23T22:57:22Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
