WMI Win32_NTLogEvent Class - Time Properties Not DateTime?


  • Hi,

    I've queried an EventLog using ManagementObjectSearcher (System.Management namespace for WMI access).  So far I was able to retrieve log entries by querying the Win32_NTLogEvent instances.

    But when I tried mapping the ManagementObject instances, the TimeGenerated and TimeWritten properties are in String form and not in DateTime type as documented (see MSDN:  I can't convert the String directly to DateTime.  A sample value I'm getting is:


    It's the first time I've tried using the System.Management namespace, especially to access Event Logs.  Please let me know if I'm doing something wrong here.  Thanks.

    Thursday, September 07, 2006 4:11 AM