How can I alter the date format in datatips?

Return to top


  • Rockford Hipp

    I am having trouble generating the three-letter month name abbreviation. Is "MMM-YY" possible in Zendesk? Can I not do this because Explore wouldn't know how to sort in ascending order along a given axis? Thanks!

  • Dave Dyson
    Hi Rockford!
    There isn't an argument you can supply to the DATE_FORMAT function that will give you the first three letters of the month, so you'll need to create a Standard Calculated Attribute with the following as the formula:
    LEFTPART(MONTH([Ticket created - Date]),3)+"-"+YEAR([Ticket created - Date])
    Hope that helps!
  • Stephen Belleau
    Community Moderator
    Zendesk Luminary

    Rockford Hipp turns out there is a way! MON (or mon or Mon, whatever case you prefer)

    // returns Mar 21 2022

    @... can we add this to please? 😊

  • Dave Dyson
    Good catch, Stephen, thanks! I'll alert our documentation team.
  • Jon Bierma

    Hi @... and Stephen Belleau - using "Mon" does provide the month's 3-letter abbreviation, but when used in Explore in a graph, the data is sorted on the axis in alphabetical order of months instead of chronologically. This can't be resolved using the Sort settings. Is there any way around this?

  • Justin H
    Zendesk Customer Care

    Hey Jon Bierma!

    There are a couple of ways to get around this, and achieve what you're looking for. Going off of using the custom attribute Dave mentioned previously, you can create an ordered set to order these displayed values chronologically. 

    Another solution to abbreviating the dates and sorting in chronological order would be to use a time based, date attribute (i.e. Ticket Created - Date). If you apply this attribute to your query, you will be able to change the date format displayed in the query by going to Chart Configuration>Date Display Format and choosing a custom date format. To get the first 3 letters of the month and the year, you will want to enter the following into that field: 

    MMM YY

    I hope this helps!


Please sign in to leave a comment.

Powered by Zendesk