obsidian-tracker
obsidian-tracker copied to clipboard
Date format(YYYYMMDD) not working properly for start/end Date
When my date format is set to YYYY-MM-DD, there are no issues, but when the date format is set to YYYYMMDD, the settings for the start date and end date become ineffective.
YYYYMMDD
searchType: tag
searchTarget: weight
dateFormat: YYYYMMDD
startDate: 20240201
endDate: 20240203
fitPanelWidth: 1
line:
title: Weight Log
yAxisLabel: Weight
yAxisUnit: kg
lineColor: yellow
YYYY-MM-DD
searchType: tag
searchTarget: weight
dateFormat: YYYY-MM-DD
startDate: 2024-02-01
endDate: 2024-02-03
fitPanelWidth: 1
line:
title: Weight Log
yAxisLabel: Weight
yAxisUnit: kg
lineColor: yellow
Whatever you set the date format to, that's how your files need to be named as well. I did the following:
- Open example vault
- Copy 20210101-D, 20210102-D, 20210103-D, 20210104-D to new files without the
-D - Go to TestCommands.md
- Edit the Line Chart example and set
- dateFormat: YYYYMMDD
- startDate: 20210101
- endDate: 20210131
- Edit the Line Chart example and set
And it works as expected
Thank you for your reply. In your experiment, there is only data from certain days in 2021, so the problem cannot be seen. When you add some data from 2018 and 2019, you will find that the set start and end times are invalid. Please see my new post pictures, thank you!!
I'm having the exact same problem. Regardless of startDate and endDate all file in the folder are included. If I change dateFormat to anything other than 'YYYYMMDD' the problem goes away.