title: How get Win32_OperatingSystem.LastBootUpTime in datetime format
body: <p>I have been trying to get LastBootUpTime using Win32_OperatingSystem class (WMI).</p>
  
  <pre><code>HRESULT hr = pEnumerator-&gt;Next(WBEM_INFINITE, 1, 
          &amp;pclsObj, &amp;uReturn);
  
      if(0 == uReturn)
      {
          break;
      }
  
      VARIANT vtProp;
  
      // Get the value of the Name property
      hr = pclsObj-&gt;Get(L"LastBootUpTime", 0, &amp;vtProp, 0, 0);          
      VariantClear(&amp;vtProp);
  </code></pre>
  
  <p>I want to write this time to CTime or COleDateTime variable. But variable vtProp has BSTR type and look like <strong>20100302185848.499768+300</strong>
  Also any datetime property of any WMI class have BSTR type</p>
  
  <p>How can I put datetime property of WMI class to CTime?</p>
  
  <hr>
  
  <p>But how use SWbemDateTime.GetVarDate() in C++? In MSDN just scripting sample for this function</p>