This documentation is archived and is not being maintained.

SPFieldDateTime Class

Windows SharePoint Services 3

Represents a field that contains date and time values.

System.Object
  Microsoft.SharePoint.SPField
    Microsoft.SharePoint.SPFieldDateTime

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class SPFieldDateTime : SPField

If you set properties of the SPFieldDateTime class you must call the Update method for changes to take effect in the database.

An SPFieldDateTime object can be rendered through the DateTimeField server control.

The SPFieldDateTime class corresponds to the DateTime data type that is specified through the Type attribute of the Field element.

Notes to Inheritors

In Windows SharePoint Services 3.0, columns based on custom field types do not appear in Datasheet view and are not included when you export a list to an Excel spreadsheet.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: