SPUtility.FormatDate method
將指定的日期與時間值轉換成SPDateFormat格式。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function FormatDate ( _
web As SPWeb, _
date As DateTime, _
fmt As SPDateFormat _
) As String
'用途
Dim web As SPWeb
Dim date As DateTime
Dim fmt As SPDateFormat
Dim returnValue As String
returnValue = SPUtility.FormatDate(web, _
date, fmt)
public static string FormatDate(
SPWeb web,
DateTime date,
SPDateFormat fmt
)
參數
web
Type: Microsoft.SharePoint.SPWebMicrosoft.SharePoint.SPWeb物件,代表該網站。
date
Type: System.DateTimeSystem.DateTime 物件,代表要轉換的值。
傳回值
Type: System.String
內含重新格式化的日期與時間值的字串。