1 Reply Latest reply on Nov 12, 2013 5:03 AM by JShirley

    Grouping by Month

    Jamie Cannon ITSMMVPGroup

      I know you can set a query to group by month but is there a way to have it say "August", "September", etc... the actual month name instead of something like:

      10/1/2013 12:00:00 AM - 11/1/2013 12:00:00 AM


      This is just really busy and not usable if you want to put this onto a pie or bar chart on a dashboard.



        • 1. Re: Grouping by Month

          Hi Jamie,


          One approach you could take is to have a calculated attribute that re-formats the date field you want to sort by.  Here's one for Incident Creation Date, giving you a "year.month (with leading zero)" result:


          import System

          static def GetAttributeValue(Incident):

                    Value = Incident.CreationDate.ToString("yyyy.MM")

                    return Value

          Or you could just return the month if you're already filtering out, say, last year's Incidents:


          Value = Incident.CreationDate.ToString("MM")


          Hope that helps.