从指定的字符串包含日期和时间值创建System.DateTime对象。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function ParseDate ( _
web As SPWeb, _
stDate As String, _
stTime As String, _
bToUTC As Boolean _
) As DateTime
用法
Dim web As SPWeb
Dim stDate As String
Dim stTime As String
Dim bToUTC As Boolean
Dim returnValue As DateTime
returnValue = SPUtility.ParseDate(web, _
stDate, stTime, bToUTC)
public static DateTime ParseDate(
SPWeb web,
string stDate,
string stTime,
bool bToUTC
)
参数
web
类型:Microsoft.SharePoint.SPWebMicrosoft.SharePoint.SPWeb对象表示该网站使用的日期和时间值。
stDate
类型:System.String一个字符串,包含的日期。
stTime
类型:System.String一个字符串,包含的时间。
bToUTC
类型:System.Booleantrue以协调世界时 (UTC) 时间 ; 将日期和时间的字符串转换为System.DateTime对象false ,以将字符串转换为本地时间的网站中的System.DateTime对象。
返回值
类型:System.DateTime
一个包含日期和时间的System.DateTime对象。