Convert WMI Win32_OperatingSystem InstallDate to mm/dd/yyyy format.
-
Hi, Is there any way to convert WMI Win32_OperatingSystem InstallDate to mm/dd/yyyy format in C++. I have seen there is a class defined in C# for the same. But I didn't find anything in C++. When I run WMI query "Select InstallDate from Win32_Operating system", I get : 20120714160600.000000+330 as the result. I want to convert this to some readable format e:g: dd/mm/yyyy format with time also. Anybody have any idea about this.? Regards, Mbatra
-
Hi, Is there any way to convert WMI Win32_OperatingSystem InstallDate to mm/dd/yyyy format in C++. I have seen there is a class defined in C# for the same. But I didn't find anything in C++. When I run WMI query "Select InstallDate from Win32_Operating system", I get : 20120714160600.000000+330 as the result. I want to convert this to some readable format e:g: dd/mm/yyyy format with time also. Anybody have any idea about this.? Regards, Mbatra
Here is the explanation of the datetime data type of WMI - http://msdn.microsoft.com/en-us/library/aa387237(v=vs.85).aspx[^]
«_Superman_» _I love work. It gives me something to do between weekends.
_Microsoft MVP (Visual C++) (October 2009 - September 2013)