' Convert FILETIME to DATETIME

' Windows NT 4.0 SP4 and later : No


Set dateTime = CreateObject("WbemScripting.SWbemDateTime")
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colMonitorProcess = objWMIService.ExecNotificationQuery _
("SELECT * FROM __InstanceOperationEvent " _
& " WITHIN 1 WHERE TargetInstance ISA 'Win32_Process'")

Set objLatestEvent = colMonitorProcess.NextEvent
Wscript.Echo "Event Class: " & objLatestEvent.Path_.Class
WScript.Echo "Event Time:"
WScript.Echo "  FILETIME format: " & objLatestEvent.TIME_CREATED
dateTime.SetFileTime objLatestEvent.TIME_CREATED, False
WScript.Echo "  DATETIME format: " &  dateTime.Value
search for scripts

VbsEdit contains all these sample scripts!


Download Now!



Download   Home   Scripts

Copyright © 2001-2024 adersοft