SPFieldDateTime.GetFieldValueAsHtml method (DateTime, SPWeb, SPDateFormat)
傳回根據指定的DateTime值、 網站和日期格式來呈現直接在網頁上的欄位值的 HTML 格式的欄位值。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function GetFieldValueAsHtml ( _
data As DateTime, _
web As SPWeb, _
dateformat As SPDateFormat _
) As String
'用途
Dim data As DateTime
Dim web As SPWeb
Dim dateformat As SPDateFormat
Dim returnValue As String
returnValue = SPFieldDateTime.GetFieldValueAsHtml(data, _
web, dateformat)
public static string GetFieldValueAsHtml(
DateTime data,
SPWeb web,
SPDateFormat dateformat
)
參數
data
Type: System.DateTimeSystem.DateTime物件,表示要轉換的DateTime值。
web
Type: Microsoft.SharePoint.SPWebSPWeb物件,表示包含欄位的網站。
dateformat
Type: Microsoft.SharePoint.Utilities.SPDateFormat指定的日期和時間格式的SPDateFormat值。
傳回值
Type: System.String
字串,包含以 HTML 格式的值。