I use Simple RSS to retrieve articles from some feeds, and this works well.
The pubDate of an item looks like this: Wed, 08 Jan 2025 10:00:00 Z
I can use split and text concatenation to convert the date-string into this 2025-Jan-08
I want the “articles” sorted by pubDate this means I have to replace Jan into 01, Apr into 04 …
I was thinking of defining a key:value object and then use
object.split(published, " ")[2] to map the Month’s shortname to a “two-digit” string.
Unfortunately, I have no idea where to define the key:value object and how to pass the “Jan”-key to the object.
To be honest, I have no idea, if this is a smart move, if this is much more simple, or if it’s not possible at all.
This is what my dataview-code looks like at the moment:
dataview
TABLE
split(published, " ")[3] + "-" + split(published, " ")[2] + "-" + split(published, " ")[1] as "pubDate"
from "SimpleRSS/MicrosoftFabricBlog"
SORT published ascending
LIMIT 20
Evaluation Error: TypeError: row.map is not a function
at eval (plugin:dataview:15613:96)
at Array.map (<anonymous>)
at Proxy.map (plugin:dataview:8269:39)
at b$1.TableGrouping [as constructor] (plugin:dataview:15613:64)
at b$1.B$2 [as render] (plugin:dataview:15050:8935)
at L$1 (plugin:dataview:15050:6523)
at P$1 (plugin:dataview:15050:2215)
at L$1 (plugin:dataview:15050:6742)
at P$1 (plugin:dataview:15050:2215)
at L$1 (plugin:dataview:15050:6742)
Evaluation Error: ReferenceError: padleft is not defined
at eval (eval at <anonymous> (plugin:dataview), <anonymous>:1:200)
at Array.map (<anonymous>)
at Proxy.map (plugin:dataview:8269:39)
at eval (eval at <anonymous> (plugin:dataview), <anonymous>:1:123)
at DataviewInlineApi.eval (plugin:dataview:18885:16)
at evalInContext (plugin:dataview:18886:7)
at asyncEvalInContext (plugin:dataview:18896:32)
at DataviewJSRenderer.render (plugin:dataview:18922:19)
at DataviewJSRenderer.onload (plugin:dataview:18464:14)
at e.load (app://obsidian.md/app.js:1:1248334)
Now I’m wondering if I miss something more general, like copy some JS files somewhere or enable as JS setting in Obsidian’s settings?
Evaluation Error: TypeError: row.map is not a function
at eval (plugin:dataview:15613:96)
at Array.map (<anonymous>)
at Proxy.map (plugin:dataview:8269:39)
at b$1.TableGrouping [as constructor] (plugin:dataview:15613:64)
at b$1.B$2 [as render] (plugin:dataview:15050:8935)
at L$1 (plugin:dataview:15050:6523)
at P$1 (plugin:dataview:15050:2215)
at L$1 (plugin:dataview:15050:6742)
at P$1 (plugin:dataview:15050:2215)
at L$1 (plugin:dataview:15050:6742)
can you please provide a complete dataview query, I was looking at flatten, but did not get the syntax correct.
Also i do not know how to make month dependent of the pubDate string value.
Works like a charm, and I will use this approach as it corresponds more to my current learning. I realized that the dataviewjs approach does not allow opening the note.