Converts a WMI VT_DATE value to a DATETIME value. The Now function of VBScript returns a VT_DATE value..

Visual Basic
Edit|Remove
Set dateTime = CreateObject("WbemScripting.SWbemDateTime")
dateTime.SetVarDate Now
WScript.Echo "Current date and time:"
WScript.Echo "  VT_DATE format: " &  dateTime.GetVarDate
WScript.Echo "  DATETIME format: " & dateTime.Value