共用方式為


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.DateTime

    System.DateTime物件,表示要轉換的DateTime值。

傳回值

Type: System.String
字串,包含以 HTML 格式的值。

請參閱

參照

SPFieldDateTime class

SPFieldDateTime members

GetFieldValueAsHtml overload

Microsoft.SharePoint namespace