SPFieldDateTime.ParseAndSetValue Method

Parses and sets the field value.

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

Syntax

'Declaration
Public Overrides Sub ParseAndSetValue ( _
    item As SPListItem, _
    value As String _
)
'Usage
Dim instance As SPFieldDateTime
Dim item As SPListItem
Dim value As String

instance.ParseAndSetValue(item, value)
public override void ParseAndSetValue(
    SPListItem item,
    string value
)

Parameters

Remarks

The value parameter must be in the format of a DateTime string that is in the website's local time and calendar. For example, if the calendar is set to Hijri and the input string is "09/08/1430", the date and time is 07/31/2009 in the Gregorian calendar.

If the item is retrieved by an SPQuery object for which the DatesInUtc property equals true, this method converts the DateTime in the Gregorian calendar to a UTC DateTime before using an indexer (for example, oItem["FieldName"] = value) to set the field value.

See Also

Reference

SPFieldDateTime Class

SPFieldDateTime Members

Microsoft.SharePoint Namespace