Frontmatter string auto formatting as date in dateview table

What I’m trying to do

A frontmatter key is pulled into a dataview table, but the string is being auto formatted as a real world date changing the characters in the string when displayed.

Example

The Frontmatter key

WorldDate:
  FullDateStart: 04013790530
  DateStart: "1379-05-30"
  FullDateEnd: 04013790532
  DateEnd: "1379-05-32"

The Dataview Query

TABLE WITHOUT ID Session, file.frontmatter.Date AS "Date", [WorldDate.DateStart, WorldDate.DateEnd] AS "World Date", Summary
FROM "Campaigns/Sessions"
WHERE Type = "Session" AND econtains(file.frontmatter.MemberOf.Campaign, this.file.frontmatter.Campaign)
SORT file.frontmatter.Date ASC

The Problem

In the table resulting from the query, the column “World Date” given the frontmatter above should display…

World Date
1379-05-30
1379-05-32

But instead displays

World Date
1379-05-30
1379-06-01

Something somewhere is recognizing the values for WorldDate.DateStart and WorldDate.DateEnd as dates and formatting them according to the Gregorian Calendar. Of course, I am using Fantasy Calendar as this is a vault for my TTRPGs

My Question

Is there a setting somewhere, or any other things I should look at to correct this auto formatting?

Ideally, dataview would display the data as written and provide no formatting.

Community Plugins in use

  • Dataview
  • Fantasy Calendar
  • Advanced Tables
  • Recent Files
  • Style Settings
  • Webpage HTML Export

Things I have tried

Known Solution

Instead of writing the string as “1370-05-32” writing it as “1379 05 32” corrects the issue.
So, including the “-” character between the numbers is part of the problem. If no other solution can be found, then this will work for me as a solution.

Ideally I’d learn what is causing the string not to be displayed as written in the dataview tables though.

Other Things I’ve Tried

  • Disable Daily Notes Core Plugin
  • Disable Note Composer Core Plugin
  • Explored settings in search of anything that looked like it could contribute to this issue, finding nothing.

Thank you all for any assistance you can provide!

Solved

Solution

Adding “file.frontmatter” before “WorldDate.DateStart” and “WorldDate.DateEnd” in the dataview query resolved the issue.

Old Querty

TABLE WITHOUT ID Session, file.frontmatter.Date AS "Date", [WorldDate.DateStart, WorldDate.DateEnd] AS "World Date", Summary
FROM "Campaigns/Sessions"
WHERE Type = "Session" AND econtains(file.frontmatter.MemberOf.Campaign, this.file.frontmatter.Campaign)
SORT file.frontmatter.Date ASC

New Query

TABLE WITHOUT ID Session, file.frontmatter.Date AS "Date", [file.frontmatter.WorldDate.DateStart, file.frontmatter.WorldDate.DateEnd] AS "World Date", Summary
FROM "Campaigns/Sessions"
WHERE Type = "Session" AND econtains(file.frontmatter.MemberOf.Campaign, this.file.frontmatter.Campaign)
SORT file.frontmatter.Date ASC

I’m glad you discovered this trick, to avoid the date conversion which has bothered me as well in some cases. Do note that this does work for frontmatter fields, but it wouldn’t work for inline fields. A similar thing also occurs if you use something that Dataview recognises as a duration, like 3 m, which for me reads as 3 meter, but that Dataview insist on being a duration of 3 minutes.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.