I am trying to get the day of the month as a number, based on the title of the daily note (YYYY-MM-DD).
<%moment(tp.file.title).format("dd")%>
But that returns a two letter string of the day of the week, not the day of the month as a number.
Within Templater you’ll need to do: <% moment(tp.file.title).format("DD")%>, see format reference. This format is used by Daily notes and Templater (and moment in general), but do note that Dataview uses Luxon tokens.
<% moment(tp.file.title).format("DD")%>
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.