This may be a stupid question, but is there a way, ideally without plugins, to sort by date the sidebar notes?
What I’m trying to do
I’ve change the date format to DD-MM-YYYY as it’s the correct format for dates but now in the sidebar sorting is lexicographical which is not great for dates
Whilst I also like to read dates as DD-MM-YYYY in text, I strongly believe that when used as, or in, a filename, the best format is YYYY-MM-DD. One obvious reason is that the file-system/s of (I’d guess) all operating systems displays them in date order.
There may be an alternate idea where you name the file with the format you like: DD-MM-YYYY but add a filename prefix that more simply represent the date in numeric form. Unix timestamp perhaps. This would sort the files in date order, include your preferred date format in the name and include a prefix that ostensibly looks meaningless and so might not be annoying to see.
It might look something like this:
1688625414 - 06-06-2023 (6th June 2023)
But my advice would be to learn to like, if not love, the YYYY-MM-DD format!
You can only sort by file name (A–Z or Z–A), modified time, or created time, so what you are seeing is expected.
For maximum functionality (especially with queries, plugins, and even sharing data with other apps) use the internationally supported ISO 8601 format for dates. What you use now looks like a date to you but a computer sees it as a string of numbers that could mean anything.
EDIT: I was typing at the same time as the two posters above. Leaving this here with the ISO link for the OP.
Something else you could consider is to ‘file’ daily files into Monthly folders.
I did set up something like this a while ago and so know it’s possible. Ultimately I found it annoying and now just use YYYY-MM-DD with files all in one folder.
In the Daily Notes setting, when defining the filename format, you can include folder/s. This can be used to, for example, file all files by month. Giving something like:
The Date format I use in the Daily notes settings is:
YYYY/MM/YYYY-MM-DD
When a new note is created, the system generates folders for the year and then the month nested inside the year (YYYY/MM/), with the daily notes being created inside the folder for the right month (YYYY-MM-DD).
So my journal has a directory of files by year and month without ever having to create a folder manually.
Change your config so that your daily files are created in monthly folders. Daily files then named as you like: DD-MM-YYYY will be sorted in date order - within the month that they belong to. The inconvenience (if it is one) of having daily files in monthly folders would surely be worth it over the ‘bodge’ of sorting by creation date… don’t you sometimes create a daily file for a future date ahead of time?
Just be sure to name your monthly folders sensibly or your months will be out of whack!
YYYY-MM seems sensible.
Or even months within years as eightnig (above) demonstrated:
While not a direct solution to your request, I hope you will give my plugin Daily Note Outline a try from community plugin list. It is a plugin that arranges multiple daily notes in chronological order and displays the outline all at once (or simply a list of chronological daily notes if you hide all outline elements).