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