SPUtility.CreateDateTimeFromISO8601DateTimeString method
Converts the specified ISO 8601 date-time value to a string DateTime format.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function CreateDateTimeFromISO8601DateTimeString ( _
ISO8601Time As String _
) As DateTime
'Usage
Dim ISO8601Time As String
Dim returnValue As DateTime
returnValue = SPUtility.CreateDateTimeFromISO8601DateTimeString(ISO8601Time)
public static DateTime CreateDateTimeFromISO8601DateTimeString(
string ISO8601Time
)
Parameters
ISO8601Time
Type: System.StringThe time, in ISO 8601 format, to convert.
Return value
Type: System.DateTime
A System.DateTime object that provides the date and time.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | ISO8601Time is a null reference (Nothing in Visual Basic). |
Remarks
This method converts the value of the ISO8601Time parameter to System.DateTime format (in YYYY-MM-DDThh:mm:ss).