Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Updating a DateTime via the Object Model

  Asked By: Griffin    Date: Mar 17    Category: Sharepoint    Views: 1935

I am trying to update a DateTime field in a list item to the current date
& time via the object model. This field includes the time.

I know there are some quirks in how to update this. Can anyone provide a
short code snippet on how to do this?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Katelynn Donovan     Answered On: Mar 17

I found the answer.

item["colname"] =
SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.Now);

 
Didn't find what you were looking for? Find more on Updating a DateTime via the Object Model Or get search suggestion and latest updates.




Tagged: