Helper.LookupDateTime Method (WorkflowContext, String, Int32, String)
Retrieves the DateTime value of a field for a specified SharePoint Foundation list item when the list item GUID is known.
Namespace: Microsoft.SharePoint.WorkflowActions
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
Public Shared Function LookupDateTime ( _
context As WorkflowContext, _
listIdOrName As String, _
listItem As Integer, _
fieldName As String _
) As DateTime
'Usage
Dim context As WorkflowContext
Dim listIdOrName As String
Dim listItem As Integer
Dim fieldName As String
Dim returnValue As DateTime
returnValue = Helper.LookupDateTime(context, _
listIdOrName, listItem, fieldName)
public static DateTime LookupDateTime(
WorkflowContext context,
string listIdOrName,
int listItem,
string fieldName
)
Parameters
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextWorkflowContext object that contains properties that are associated with the active workflow instance.
listIdOrName
Type: System.StringA string that represents the GUID of the SharePoint Foundation list ID or display name of the list.
listItem
Type: System.Int32An integer that represents the SharePoint Foundation list item in a specified list.
fieldName
Type: System.StringA string that represents the name of the field in the list from which you want to retrieve a Boolean value.
Return Value
Type: System.DateTime
A DateTime value from the specified field.
Remarks
The LookupDateTime method reads the value of the specified field and stores it as an object. Then it modifies or casts the value of the object, depending on the SPFieldType of that field.