Windows install data searchable in web reports by days old

(imported topic written by Mark_Macherey)

Im using the relevance below and retrieving the data just fine, but in web reports it treats it as a string, im trying to use the data as a date like “Last Report Time” and search “Less than” X days

q:if (exist wmi) then (time value of select (“InstallDate from Win32_OperatingSystem”) of wmi as string) else (“N/A”)

A: Fri, 27 May 2011 14:23:52 -0400

T: 15.371 ms

(imported comment written by cstoneba)

unless you write your own WebReports session relevance report (where you could convert the string to (as time), i don’t believe you can convert the output of a property to be a date/integer,etc.

Having that ability has always been something i felt would be useful.

(imported comment written by Matt.Johnson)

Mark,

I am sharing some relevance I used to generate data close to yours. What I was looking to do was have a count of days to allow 2 days from the deployment date for some tasks to take place before showing up on a report. I believe the timestamp is generated by Windows during an image.

Hope this helps:

((day_of_week of date ((parenthesized part 3 of it) & " " & (parenthesized part 2 of it as integer as month as three letters as string) & " " & (parenthesized part 1 of it)) as three letters & ", " & ((parenthesized part 3 of it) & " " & (parenthesized part 2 of it as integer as month as three letters as string) & " " & (parenthesized part 1 of it))) of match (regex “^([0-9]})([0-9]{2{4})([0-9]{2})”) of (value “Deployment Timestamp” of key “HKLM\Software\Microsoft\Deployment 4” of native registry as string)) as date < (current date - 2 * day)

Hope you can adapt it.

(imported comment written by jgstew)

See this relevance for getting the OS install date:

Windows Install Date:
http://bigfix.me/relevance/details/2196

Days since Windows Install Date:
http://bigfix.me/relevance/details/2199

Related:
http://bigfix.me/analysis/details/2994629