Date Format & Sorting Not Working

Answered


Posted Jun 03, 2021

I'm trying to create a new attribute for weeks starting on Monday, and then format that into a simple date string, but it's showing up with "T00:00:00" after it and I cannot figure out why. Here is the attribute I created. The START_OF_WEEK_MONDAY part is working, but it's displaying with the extra timestamp portion. 

Also, it's not showing up as a date in the selection tab; it's not showing me the advanced date selection options. Is this value not being recognized as a date anymore? 

DATE_FORMAT(START_OF_WEEK_MONDAY([Ticket created - Date]),"YYYY-MM-DD")


0

3

3 comments

Hey, Matthew Gravelyn, thanks for bringing this to our attention! Our dev team is currently investigating an issue with the DATE_FORMAT function incorrectly displaying results with a timestamp. I will create a ticket on your behalf (which you should receive an email about shortly), so that you can receive updates to the resolution. 

0


Thank you, this helps on the one chart. Unfortunately this means I have to change this option of the dozens of charts where I'm already using this variable, which is a bummer. 

Also, I just noticed that in the query editor, before making the change you proposed here, the dates are displaying properly (top image) but still showing the odd date format on the dashboards (bottom image). How are these showing two different things? Is there a global option set somewhere to dictate how dates are displayed? 

0


Hi 367227898388, that's odd I would expect the DATE_FORMAT function to display the date as you intended. It might be because it's returning a string rather than a date, but I'm not sure. In any case you can change how the dates are displayed by going to 'Chart Configuration' and selecting 'Date Display Format'. There are a number of presets you can use, but you can also select your own.

I don't think that the 'Edit Date Range' options are available on custom attributes.

0


Sign in to leave a comment.

Didn't find what you're looking for?

New post