Hi all
I have tried to run a WMI query to process Application events on or after a
certain date (SearchEventStart). I have tried each of the following formats
for SearchEventStart to no avail.
20190628123502.000000+000
28/06/2019 12:34:10 PM
2019-06-28 12:35:27:000
The code I am using looks like this:
strComputer = "."
objWMIService = GetObject("winmgmts:\\" + strComputer + "\root\cimv2")
colEvents = objWMIService.ExecQuery( "Select * from Win32_NTLogEvent Where
Logfile = 'Application' And TimeWritten >= '" + SearchEventStart + "'" )
This does not work but it works if I omit the second part of the WHERE clause
like so:
colEvents = objWMIService.ExecQuery( "Select * from Win32_NTLogEvent Where
Logfile = 'Application'")
Any ideas? Any help would be much appreciated. Thanks
Paul Newton
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/mn2pr02mb59676264c9a4dd95a7b9118ba1...@mn2pr02mb5967.namprd02.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.