What I’m trying to do
I have a dataview as follows:
TABLE
dateOfPurchase
FROM #InventoryItem
WHERE file.name = "Air Pump"
SORT file.name asc
The file Air Pump looks like this:
dateOfPurchase:: 2021-09-10
#InventoryItem
So far, so good. However, when the dataview is rendered, it changes the date format to “September 10, 2021”. This makes the date too long, and breaks each row into multiple lines.
I’ve attempted to use several formatting ways, such as:
- dateFormat(dateOfPurchase, “YYYY-MM-dd”)
- date(file.day, “YYYY-MM-dd”)
- date(dateOfPurchase, “YYYY-MM-dd”)
- Etc.
I’ve scoured the Dataview documentation, searched these forums, and googled this.
However, no matter what I’ve tried, the date always displays as “September 10, 2021”.
Is there any way to apply a date format to a date shown in a dataview? I’m trying to get it to display as either of:
- 2021-Sep-10
- 2021-09-10