Export (0) Print
Expand All

SPUtility.ParseDate method (SPWeb, String, SPDateFormat, Boolean)

Creates a System.DateTime object from the specified strings containing date and time values.

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

public static DateTime ParseDate(
	SPWeb web,
	string stDateTime,
	SPDateFormat format,
	bool bToUTC
)

Parameters

web
Type: Microsoft.SharePoint.SPWeb

An Microsoft.SharePoint.SPWeb object that represents the site in which the date and time value is used.

stDateTime
Type: System.String

A string that contains the date and time.

format
Type: Microsoft.SharePoint.Utilities.SPDateFormat

An SPDateFormat enumeration value that determines the format of the date output.

bToUTC
Type: System.Boolean

true to convert data and time strings into a System.DateTime object in Coordinated Universal Time (UTC) time; false to convert the strings into a System.DateTime object in local time for the site.

Return value

Type: System.DateTime
A System.DateTime object that contains the date and time.
Show:
© 2014 Microsoft