SPRelativeDateTime.GetRelativeDateString 方法

返回给定当前时间和过去的时间相对日期时间。

命名空间:  Microsoft.SharePoint.Utilities
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Shared Function GetRelativeDateString ( _
    web As SPWeb, _
    now As DateTime, _
    then As DateTime _
) As String
用法
Dim web As SPWeb
Dim now As DateTime
Dim then As DateTime
Dim returnValue As String

returnValue = SPRelativeDateTime.GetRelativeDateString(web, _
    now, then)
public static string GetRelativeDateString(
    SPWeb web,
    DateTime now,
    DateTime then
)

参数

返回值

类型:System.String
一个本地化的字符串,它表示视觉显示的相对时间差异。

另请参阅

引用

SPRelativeDateTime 类

SPRelativeDateTime 成员

Microsoft.SharePoint.Utilities 命名空间