Data type of rollup unknown

Hi all,
Who can help me out with converting a rollup result to a specific data type?

I use a rollup field with ARRAYUNIQUE(values) in which the values are dates. Normally, this will be one single date (since I am checking if all values in the array are the same). The field of origin is of the date/time type (which I have enforced by a formula and Airtable recognizes it as a date). However, the date as displayed in the rollup field can not be manipulated by any formula in another field. It appears as if the data type of the rollup field (which is an array, of course) can not be determined, which makes it impossible to convert.

Things I have tried that did not work:

  • ARRAYJOIN(ARRAYUNIQUE(values), "; ") to convert the array into a single string.
  • DATETIME_FORMAT(ARRAYUNIQUE(values), ‘D/M/YYYY’) as the rollup formula to convert the array into a date (or even an array of dates)

Any ideas?

DATETIME_FORMAT() isn’t working because it requires a single datetime item, but ARRAYUNIQUE() still returns an array.

The only functions I know of that will actually output a datetime item are MAX() and MIN(), which return the latest and earliest date from an array, respectively. Provided that ARRAYUNIQUE() leaves you with a single-item datetime array, then this should work:

MAX(ARRAYUNIQUE(values))

That will leave you with an actual date, which can be used elsewhere as needed.

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