Topic
1 reply Latest Post - ‏2013-07-01T15:31:54Z by Ivan.FPL
Ivan.FPL
Ivan.FPL
28 Posts
ACCEPTED ANSWER

Pinned topic Format custom date property to sort like "Last Report Time"

‏2013-05-30T20:17:50Z |

I'm trying to create a custom property (specifically, the "Enrollment Time" property from the "Device Enrollment Status" analysis) to appear and sort similar to the "Last Report Time" property. Although I was able to format the output string with the relevance below, I noticed it wasn't sorting nicely like "Last Report Time" does. Then after looking at the "Last Report Time" relevance, I observed that the console must be doing something special with that property because the output should be of the form "Thu, 30 May 2013 15:49:02 +0000" but is instead being displayed as "5/30/2013 11:49:02 AM" within the columns. Besides the relevance below, is there something I can do to make this property appear and behave exactly like "Last Report Time"?

The below relevance converts from "Thu, 30 May 2013 15:49:02 +0000" to "05/30/2013 11:49:02 AM" (month and day are two digits)

((month of it as two digits & "/" & day_of_month of it as two digits & "/" & year of it as string) of (date (local time zone) of (enrollment time of mdm server))) & " " & (((if (hour_of_day of it > 12) then (hour_of_day of it - 12) else (if (hour_of_day of it = 0) then (12) else (hour_of_day of it))) as string & ":" & (two digit minute of it) as string & ":" & (two digit second of it) as string & " " & (if (hour_of_day of it > 11) then ("PM") else ("AM"))) of (time (local time zone) of (enrollment time of mdm server)))

  • Ivan.FPL
    Ivan.FPL
    28 Posts
    ACCEPTED ANSWER

    Re: Format custom date property to sort like "Last Report Time"

    ‏2013-07-01T15:31:54Z  in response to Ivan.FPL

    No ideas? Has anyone attempted something similar?