共用方式為


SPUtility.GetExampleDateFormat Method

Returns an example of the format that is used for dates in the specified site.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Shared Function GetExampleDateFormat ( _
    web As SPWeb, _
    stYearLabel As String, _
    stMonthLabel As String, _
    stDayLabel As String _
) As String
'Usage
Dim web As SPWeb
Dim stYearLabel As String
Dim stMonthLabel As String
Dim stDayLabel As String
Dim returnValue As String

returnValue = SPUtility.GetExampleDateFormat(web, _
    stYearLabel, stMonthLabel, stDayLabel)
public static string GetExampleDateFormat(
    SPWeb web,
    string stYearLabel,
    string stMonthLabel,
    string stDayLabel
)

Parameters

  • stYearLabel
    Type: System.String

    A string that contains a number representing a sample year.

  • stMonthLabel
    Type: System.String

    A string that contains a number representing a sample month.

  • stDayLabel
    Type: System.String

    A string that contains a number representing a sample day.

Return Value

Type: System.String
A string that represents the date format that is used in the site.

See Also

Reference

SPUtility Class

SPUtility Members

Microsoft.SharePoint.Utilities Namespace