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
)
参数
- web
类型:Microsoft.SharePoint.SPWeb
now
类型:System.DateTime当前的时间。
then
类型:System.DateTime在前一次。
返回值
类型:System.String
一个本地化的字符串,它表示视觉显示的相对时间差异。