Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

SPUtility.FormatDate method

Converts the specified date and time value to an SPDateFormat format.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
public static string FormatDate(
	SPWeb web,
	DateTime date,
	SPDateFormat fmt
)

Parameters

web
Type: Microsoft.SharePoint.SPWeb

A Microsoft.SharePoint.SPWeb object that represents the site.

date
Type: System.DateTime

A System.DateTime object that represents the value to convert.

fmt
Type: Microsoft.SharePoint.Utilities.SPDateFormat

A Microsoft.SharePoint.Utilities.SPDateFormat value that specifies the new format.

Return value

Type: System.String
A string that contains the reformatted date and time value.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.