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

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…

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…

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!

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

2 Likes

Mic drop…

Easy…Peasy

1 Like

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