SPUtility.CreateSystemDateTimeFromXmlDataDateTimeFormat method

Converts the date and time value from ISO8601 DateTime format (YYYY-MM-DDTHH:MM:SSZ) to system DateTime format (mm/dd/yyyy hh:mm:ss AM or PM).

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static DateTime CreateSystemDateTimeFromXmlDataDateTimeFormat(
	string strDT


Type: System.String

A string that contains the date and time in XMLDATA DateTime format (YYYY-MM-DDTHH:MM:SSZ).

Return value

Type: System.DateTime
A System.DateTime object that represents the date and time in system DateTime format.

The CreateSystemDateTimeFromXmlDataDateTimeFormat converts, for example, "2003-06-20T16:42:08Z" to "6/20/2003 4:42:08 PM".