Xbasic

WMI_DATE_TO_TIME Function

Syntax

Local_Date_Time as T = WMI_DATE_TO_TIME( Formatted_CIM_Date_Time as C, Local_Time_Zone as C )

Arguments

Local_Date_Time

Local date and time.

Formatted_CIM_Date_Time

Formatted CIM Date time string.

Local_Time_Zone

Local time zone.

Description

Legacy. Converts a CIM Date Time string

Discussion

The WMI_DATE_TO_TIME() function converts a CIM Date Time string as used by WMI to an Alpha Anywhere Time value in the local time zone. This is a replacement for WMI's SWbemDateTime object because that object is only available on Windows XP and Windows 2003. The WMI CIM format is yyyymmddHHMMSS.mmmmmmsUUU.

Example

? wmi_datetime_to_time("20040616180931.990000-240", a5_os_info().CurrentTimeZone)
= 06/16/2004 06:09:31 00 pm

See Also