Sorting items by date

Is there any way to sort a list of items (within the same document) so that those with a date closer to the current day display higher on the list?

Doing a date search within a range doesn’t appear to do this unless I am missing something.

2 Likes

You didn’t miss anything. Sorting of any sort (lol) is not implemented right now, so the order is not modified in any way.

Sorting alphabetically is a feature request, but as far as I know sorting by date isn’t one right now.

Workaround: Put dates in beginnings of items, so then you can copy all your items, have them sorted alphabetically,* then paste them back in?

* A text editor like Sublime Text could be used. I often just end up running pbcopy | sort | pbpaste in my OS X command line.

I appreciate the workaround - unfortunately at the point where doing a search, copying the text into another program, sorting it, and pasting it back is the solution I think I might as well just stick with a calendar or another program that can handle dates natively instead for any usecase that involves dates in this way.

1 Like

If you are comfortable with the command line, maybe you can create an Applescript with the command I mentioned in my answer and have a keyboard shortcut to trigger that shortcut?

This might not work properly with searches, though I’m not even sure if it’s always clear what sorting should do in that case.

But yeah, I agree that at some level of needed functionality, something that natively understands dates becomes necessary.

3 Likes

Thanks for proposing the workaround :slight_smile:

1 Like

Here to +1 sort by date when items have a date. Question is what to do with items that don’t have a date. Should they go first or last? In my current use case I want them to appear first…

There’s also the question of which date to sort if an item has more than one date. Not a common case but it’s possible. :thinking:

Yes, in my current use case I will end up having more than one date. In this case I would want it sorted by the most recent date for each item, ignoring older dates.