Bug report — Sorting dates by descending shows null values first (0.5.2 beta)
See original GitHub issueWhat happened?
Dataview 0.5.2 seems to have introduced an issue when sorting dates in descending order, e.g. sort date desc
when the query contains null values.
Previously (0.4.2+) when sorting by descending date, the most recent dates would appear at the top of the list. Null values would appear at the bottom.
In 0.5.2 null values appear at the top, then followed by the most recent to oldest.
DQL
No response
JS
No response
Dataview Version
0.5.2
Obsidian Version
0.14.14
OS
MacOS
Issue Analytics
- State:
- Created a year ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
ORDER BY DATE showing NULLS first then most recent dates
I would like my results ordered by a date field and display all records with NULL dates first and then the most recent...
Read more >sort date field descending with null listed first - MSDN - Microsoft
They want to be able to sort descending on the "to" field so that they see the most recent listed first. The problem...
Read more >How ORDER BY and NULL Work Together in SQL
You'll see the NULLs first when a column is sorted in ascending order and last when the column is sorted in descending order....
Read more >af:table clicking on a Column to Sort Descending shows Null ...
in the base view object class. By default, this method returns null because the sorting is done in the database through a SQL...
Read more >DescTools.pdf
Easy format for numbers and dates. Desc. Produce a rich description of an object. Abstract. Display compact overview of the structure of a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No. Can still get around it by using
default()
and/or some custom function for sorting.I swapped the order that
null
appears in sorts (from nulls FIRST to nulls LAST by default); I’m not sure why I did that. Let me check the git history.