I have a datetime column called eventdate with values like 2025-09-13T00:00:00.000Z. When I imported the data from Athena into Quick Sight, the field was automatically recognized as a date type (confirmed by the calendar icon in the dataset).
I selected SPICE as the query mode, published the dataset, and added a table visual. I included eventdate in the Group By field well, and under Format → Custom, I selected the format DD-MMM-YY. However, the date still displayed as 13 Sep, 2025.
To work around this, I created a calculated field using:
formatDate({eventdate}, ‘dd-MMM-yy’)
The calculated field saved successfully, but when I added it to the table visual, I received the following error:
“Your function expression contains an unsupported date. Correct the date format and try again.”
After some research and testing, I switched the dataset from SPICE to Direct Query, and surprisingly:
-
The same calculated field worked without errors.
-
The custom date formatting on the original
eventdatefield also displayed correctly.
Question:
Is this behavior expected when using SPICE? If so, what causes formatDate() to fail in SPICE but work in Direct Query, even when the field is already typed as a date?
Any insights or best practices would be appreciated!