Export (0) Print
Expand All

SPUtility.ParseDate method (SPWeb, String, String, 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 stDate,
	string stTime,
	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.

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:
© 2014 Microsoft