Ads

Monday, 1 July 2013

Use of sharePoint date time field in C# code

<SharePoint:DateTimeControl ID="DateTimeControl1" runat="server" TabIndex="1" IsRequiredField="false" CssClassDescription="ms-formvalidation" LocaleId="2057" DateOnly="true" />


 if (!dtQueryDate.IsDateEmpty)
{
       itemToUpdate["Query_x0020_date"] = SPUtility.CreateISO8601DateTimeFromSystemDateTime(dtQueryDate.SelectedDate);
}

No comments:

Post a Comment

Ads