Thank you anamorphic, doing that'll create an option to select from Sort as "Edit -> Sort -> Sort by date (desc)". When I apply this option to a playlist the tracks are sorted by date but not accurately. Could this be from me using %date% formatted as "yyyy-mm-dd"?
Could be. Change it to include month and day -
date (desc)=$sub(9999,$year(%date%))-$sub(99,$month(%date%))-$sub(99,$day_of_month(%date%))
Note you can add secondary fields to sort by, after date -
date (desc)=$sub(9999,$year(%date%))-$sub(99,$month(%date%))-$sub(99,$day_of_month(%date%))|$stripprefix(%album artist%)|$stripprefix(%album%)|%discnumber%|%tracknumber%|$stripprefix(%title%)
(Using $stripprefix excludes prefixes to sort other fields alphabetically)
Also, is there a way to force this option for playlists? Either by creating an autoplaylist or applying the custom sort option?
Sure. Default playlist sorting is done by the library viewer. So it depends, which one you are using?
For auto-playlists, enter your above default sort pattern in Preferences > Shell Intergration > 'Sort incoming files by'. (I think this works as a default for auto-playlists? And without needing to specify SORT in the Library > Search)
For library selection playlists, find the default sort option in Preferences and enter your sort pattern as above (again no need for "date (desc)=" at the beginning) -
Facets = Preferences > Media Library > Facets > 'Default sort order'
Columns UI Filters = Preferences >Display > Columns UI > Filters > Behavior tab > 'Sort tracks added...'
Album List is different, default playlist sorting is the view pattern. There is no clean way to sort descending (by default) without displaying the subtracted dates.
If you really want to default sort by descending dates, I recommend not using Album List.
If you want a better tree library I would replace it in your layout with Spider Monkey Panel + Library Tree script, which has far more options. (I can add more detail if needed...)
Cheers