' Convert DATETIME to VT_DATE

' Windows NT 4.0 SP4 and later : No


Set dateTime = CreateObject("WbemScripting.SWbemDateTime")
For Each os In GetObject("winmgmts:").InstancesOf("Win32_OperatingSystem")
    ' the InstallDate property is a CIM_DATETIME.
    WScript.Echo "Operating system installation date:"
    WScript.Echo "  WMI DATETIME format: " &  os.InstallDate
    dateTime.Value = os.InstallDate
    WScript.Echo "  VT_DATE format: " & dateTime.GetVarDate
Next
search for scripts

VbsEdit contains all these sample scripts!


Download Now!



Download   Home   Scripts

Copyright © 2001-2024 adersοft