Helper.ToDateTimeExceptNull Method
Attempts to coerce a value into a DateTime object.
Namespace: Microsoft.SharePoint.WorkflowActions
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
Public Shared Function ToDateTimeExceptNull ( _
context As WorkflowContext, _
val As Object _
) As DateTime
'Usage
Dim context As WorkflowContext
Dim val As Object
Dim returnValue As DateTime
returnValue = Helper.ToDateTimeExceptNull(context, _
val)
public static DateTime ToDateTimeExceptNull(
WorkflowContext context,
Object val
)
Parameters
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextA WorkflowContext object that contains properties that are associated with the active workflow instance.
val
Type: System.ObjectA Object.
Return Value
Type: System.DateTime
The instant in time.
Remarks
The valid types that are processed successfully are String, Double, Int32, Int64, and DateTime.