2 Replies Latest reply on Jul 25, 2013 8:53 AM by rlane2012

    Looking for a way to parse out the internal date created field

    rlane2012


      I am trying to create a trend for when a VM is created and segment by month. The only way I can see to do this is to parse out the internaldatecreated field to only give the month and year (not the day and time). I am unable to find any documentation to support this option though. Does anyone know of a way to create this trend?

       

      Thank you

        • Re: Looking for a way to parse out the internal date created field
          Milan_Volejnik

          Hi,

           

          please try this:

          1) create a new Trend, on Segmentation tab insert this formula: substring(/virtualMachine/internal//dateCreated,1,7)
          [see help for XPATH on the internet]

          VMAN_Trend_segmentation01.PNG

          2) on Dashboard create a new Trend widget (it's recommended that Mode is set to Multi-Trend Table):

          VMAN_Trend_segmentation02.PNG

          Please let us know if it helps or if you need further info.

            • Re: Looking for a way to parse out the internal date created field
              rlane2012

              When I submitted this question I wasn't even aware it was using XPath. I have since had time to research and discover a few things, but when I initially tried the substring you have it would not return the dash. Now it is returning the full 7 characters. I don't understand that, but appreciate your respone.

               

              My solution was the string below, but I tested your string again just to be sure and it worked this time.

              concat(substring(/virtualMachine/internal/dateCreated,1,4),'-', substring(/virtualMachine/internal/dateCreated,6,2))

               

               

              Thank you