I have a value Im returning from an XML file, the value is a date and time, the actual value is
20100416184511
so (4 year/2 month/2 day/2 hour/2 minute/2 second)
I split it up so its readable with this
Q: (first 4 of it & “-” & last 2 of the first 6 of it & “-” & last 2 of the first 8 of it & " " & first 2 of the last 6 of it & “:” & first 2 of the last 4 of it) of (substring between “%22” of (attribute 2 of select “ns:SiteLists” of xml document of file (name of drive of windows folder & “\Documents and Settings\All Users\Application Data\McAfee\Common Framework\ServerSiteList.xml”) as xml))
A: 2010-04-16 18:45:11
and what im trying to do is determine how many days old that number is,
Q: now - 20100416
A: 10 days old
This value is actually the last time McAfee communicated to it’s EPO server
Q: current date - date (( last 2 of it & " " & first 3 of (month (last 2 of first 6 of it as integer) as string) & " " & first 4 of it) of (first 8 of “20100416184511”))
Q: current date - date (( last 2 of it & " " & first 3 of (month (last 2 of first 6 of it as integer) as string) & " " & first 4 of it) of (first 8 of ((first 4 of it & last 2 of the first 6 of it & last 2 of the first 8 of it) ) of (substring between “%22” of (attribute 2 of select “ns:SiteLists” of xml document of file (name of drive of windows folder & “\Documents and Settings\All Users\Application Data\McAfee\Common Framework\ServerSiteList.xml”) as xml))))
A: 12 days
Error checking…
if exists file (name of drive of windows folder & “\Documents and Settings\All Users\Application Data\McAfee\Common Framework\ServerSiteList.xml”) then (current date - date (( last 2 of it & " " & first 3 of (month (last 2 of first 6 of it as integer) as string) & " " & first 4 of it) of (first 8 of ((first 4 of it & last 2 of the first 6 of it & last 2 of the first 8 of it) ) of (substring between “%22” of (attribute 2 of select “ns:SiteLists” of xml document of file (name of drive of windows folder & “\Documents and Settings\All Users\Application Data\McAfee\Common Framework\ServerSiteList.xml”) as xml))))) as string else “”
Sorry I thought it auto subscribed when ever I poster ?
Do you mean McAfee EPO stats in general
Days since Last Communication (LastUpdateCheck) Period Every Report
if exists file (name of drive of windows folder &
"\Documents and Settings\All Users\Application Data\McAfee\Common Framework\ServerSiteList.xml") then (
if (current date - date ((last 2 of it &
" " & first 3 of (month (last 2 of first 6 of it as integer) as string) &
" " & first 4 of it) of (first 8 of ((first 4 of it & last 2 of the first 6 of it & last 2 of the first 8 of it)) of ((
if (exists key
"HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\Framework" of registry) then (value
"LastUpdateCheck" of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\Framework" of
native registry as string)
else
"00000000000000"))))) as string =
"00:00:00" then
"0 days"
else (current date - date ((last 2 of it &
" " & first 3 of (month (last 2 of first 6 of it as integer) as string) &
" " & first 4 of it) of (first 8 of ((first 4 of it & last 2 of the first 6 of it & last 2 of the first 8 of it)) of ((
if (exists key
"HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\Framework" of registry) then (value
"LastUpdateCheck" of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\Framework" of
native registry as string)
else
"00000000000000"))))) as string) as string
else
"<file not exists>"
Days since Last Communication (LastUpdateCheck)Result Count Percentage