Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: desktop apps only
The CreatedTime property gets a Date value (DATE value in C++) that specifies the date and time in Coordinated Universal Time (UTC) when the enterprise policy was created.
This property is read-only.
Syntax
HRESULT get_CreatedTime(
DATE *pdCreatedTime
);
' Data type: Date
Property CreatedTime( _
ByVal pdCreatedTime As DATE _
) As Date
Property value
Date value that specifies the date and time in Coordinated Universal Time (UTC) when the enterprise policy was created.
Error codes
This property method returns S_OK if the call is successful; otherwise, it returns an error code.
Remarks
This property is read-only.
Examples
This VBScript script retrieves the collection of policies defined for the enterprise, iterates through the collection, and displays the names of the policies and the dates and times when they were created.
' Create the root object.
Set root = CreateObject("FPC.Root")
' Declare the other objects needed.
Dim policies ' An FPCPolicies collection
Dim policy ' An FPCPolicy object
' Get references to the array object and
' the enterprise policies collection.
Set policies = root.Enterprise.Policies
' List the enterprise policies and the date on which each was created.
WScript.Echo "***Enterprise Policies***"
For Each policy In policies
WScript.Echo policy.Name & ": " & DateToText(policy.CreatedTime) _
& " " & TimeToText(policy.CreatedTime)
Next
Private Function DateToText(timeStamp)
Dim monthStr
Dim yearStr
Dim dayStr
Dim dateVal
dateVal = CDate(timeStamp)
monthStr = AddZero(Month(dateVal))
dayStr = AddZero(Day(dateVal))
yearStr = CStr(Year(dateVal))
DateToText = yearStr & "-" & monthStr & "-" & dayStr
End Function
Private Function AddZero(theObj)
If(Len(CStr(theObj)) < 2) Then
AddZero = "0" & CStr(theObj)
Else
AddZero = CStr(theObj)
End If
End Function
Private Function TimeToText(timeStamp)
Dim hourStr
Dim minStr
Dim secStr
Dim dateVal
dateVal = CDate(timeStamp)
hourStr = AddZero(Hour(dateVal))
minStr = AddZero(Minute(dateVal))
secStr = AddZero(Second(dateVal))
TimeToText = hourStr & ":" & minStr & ":" & secStr
End Function
Requirements
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only) |
Version |
Forefront Threat Management Gateway (TMG) 2010 |
IDL |
Msfpccom.idl |
DLL |
Msfpccom.dll |
See also
Build date: 7/12/2010