This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

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


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

  • 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.

  • 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