This documentation is archived and is not being maintained.

SPUtility.ParseDate Method (SPWeb, String, String, Boolean)

Windows SharePoint Services 3

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 stDate,
	string stTime,
	bool bToUTC
)

Parameters

web
Type: Microsoft.SharePoint.SPWeb
A Microsoft.SharePoint.SPWeb object that represents the site in which the date and time value is used.
stDate
Type: System.String
A string that contains the date.
stTime
Type: System.String
A string that contains the time.
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: