Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Grouping and sorting issue - by date

Topic Labels: Dates & Timezones
3264 2
cancel
Showing results for 
Search instead for 
Did you mean: 
rbrauns
4 - Data Explorer
4 - Data Explorer

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!

2 Replies 2

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.

Ben_Edmonds
4 - Data Explorer
4 - Data Explorer

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). 

Screenshot 2023-09-19 16.43.28.png

 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