0

I am fetching data from external list using SPListItemCollection.GetDataTable() method. But this method throws error:

"String was not recognized as a valid DateTime.Couldn't store <2015-03-24 13:51:51:007> in MyDate Column. Expected type is DateTime.

I searched in the forum i found this post

I tried it, but no luck! Any thoughts?

2

the date format is typically the ISO format 8601 yyyy-MM-ddThh:mm:ssZ

(the above page documentation is actually wrong as it states minutes twice)

e.g.

(get-date).ToString("yyyy-MM-ddThh:mm:ssZ")

output

2017-10-11T11:56:53Z

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.