Skip to main content

Grouping and sorting issue - by date


Forum|alt.badge.img

Hi -
I’m running into a problem when I try to group a list of events. The dates are from Dec. 21 up to Dec. 22 and I’ve one column witha formula that extracts the month from the date column.
I can sort my table by the date field and it’s all fine, but when I then group by month, the order gets messed up. How can I create a grid view that is sorted by month and shows the month in the right order? And in addition with a two times December (21,22) entry??

Thanks for any help!

Kamille_Parks11
Forum|alt.badge.img+25

Assuming your formula results in “December” and not “12”, you could adjust your formula to do something like:

DATETIME_FORMAT({Date A}, "YYYY - MM - MMMM")

to result in “2021 - 12 - December” so you can group by each month in the proper order.


Forum|alt.badge.img+2
  • New Participant
  • September 19, 2023

I'm seeing something similar:

  • Our table has a "date" field with time enabled, and it is named "Date & time"
  • Another field named "Date" which is formula:
    DATETIME_FORMAT({Date & time}, 'D MMM YYYY')
    This gives us friendly dates like "19 Sep 2023".
    • NB: This field does not allow formatting. It has the message: Your result type is not a number or a date. Formatting options are currently only available if your result type is a number or a date.
    • My understanding is that the DATETIME_FORMAT formula should set the output as a date, not a string (data type). https://support.airtable.com/docs/formulas-and-date-fields
  • Creating a few that groups by the "Date" field, seems to sort it as a string (not a date). 

 I'd expect the groups in this screenshot to be in this order:

  • 19 Sep 2023
  • 18 Sep 2023
  • 19 Sep 2023
  • 25 Aug 2023
  • 22 Aug 2023
  • 21 Aug 2023

Reply