none
DateTime format [ 00000000014500.000000:000 ] RRS feed

Answers

  • Try this:

    TimeSpan ts = ManagementDateTimeConverter.ToTimeSpan( y["ScanScheduleTime"].ToString() );
    Console.WriteLine( ts );
    Console.WriteLine( ts.TotalSeconds );
    

    • Marked as answer by sudhakar3697 Tuesday, May 1, 2018 1:26 PM
    Monday, April 23, 2018 10:28 AM
  • It is the Distributed Management Task Force (DMTF) interval format. The following example shows the format of a date-time interval.

    ddddddddHHMMSS.mmmmmm:000

    For details about the meaning of those fields, refer to the WMI documentation regarding Interval Formats.

    wizend

    Monday, April 23, 2018 6:24 PM

All replies

  • No, it doesn't.  Please show us the exact code that produced this output.

    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    Monday, April 23, 2018 5:40 AM
  •  try
                {
                    ManagementObjectSearcher x = new ManagementObjectSearcher(@"root/microsoft/windows/defender", "Select * from msft_mppreference");
                    foreach(ManagementObject y in x.Get())
                    {
                        Console.WriteLine(y["ScanScheduleTime"]);
                    }
                }
                catch(Exception e)
                {
                    Console.WriteLine(e.Message);
                }
                Console.ReadKey();
    • Marked as answer by sudhakar3697 Tuesday, May 1, 2018 1:26 PM
    • Unmarked as answer by sudhakar3697 Tuesday, May 1, 2018 1:26 PM
    Monday, April 23, 2018 10:16 AM
  • Try this:

    TimeSpan ts = ManagementDateTimeConverter.ToTimeSpan( y["ScanScheduleTime"].ToString() );
    Console.WriteLine( ts );
    Console.WriteLine( ts.TotalSeconds );
    

    • Marked as answer by sudhakar3697 Tuesday, May 1, 2018 1:26 PM
    Monday, April 23, 2018 10:28 AM
  • There is in the doc :

    "Specifies the time of day, as the number of minutes after midnight, to perform a scheduled scan. The time refers to the local time on the computer. If you do not specify a value for this parameter, a scheduled scan runs at a default time of two hours after midnight.

    "

    Monday, April 23, 2018 10:28 AM
  • It is the Distributed Management Task Force (DMTF) interval format. The following example shows the format of a date-time interval.

    ddddddddHHMMSS.mmmmmm:000

    For details about the meaning of those fields, refer to the WMI documentation regarding Interval Formats.

    wizend

    Monday, April 23, 2018 6:24 PM
  • Thank you very much :)
    Tuesday, April 24, 2018 3:53 AM