Function WMIDateStringToDate(DateTime) Set WbemDateTime = _ CreateObject("WbemScripting.SWbemDateTime") WbemDateTime.Value = DateTime WMIDateStringToDate = WbemDateTime.GetVarDate() End Function
参考链接:It's About Time (Oh, and About Dates, Too) 原文:http://demon.tw/programming/wmi-datetime-vbs.html