Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Updating a list via list Web Service: syntax error in CAML query...

  Asked By: Stacey    Date: Jan 08    Category: Sharepoint    Views: 2903

I’ve got a process that’s managing the content within a custom list (scheduled job… it adds/updates/deletes items from the list from a background system). The process runs on a remote server and updates the list via the list.asmx Web Service. My problem is with the date/time fields. My query works for all my other fields (I’ve removed the date/time field out of the query and my process runs with no error codes in the CAML response).

The specific field “Event Date” (with an internal SP name of “Event_x0020_Date”), requires a value and only needs the date (time is not required).

Referencing Ryan’s article (blogs.msdn.com/.../239968.aspx), I’ve tried to specify the field in the following format: yyyy-mm-ddThh:mm:ssZ, but no luck…

Here are the different values I’ve tried in my query:

<Field Name="Event_x0020_Date">2005-00-01T12:00:00Z</Field>

<Field Name="Event_x0020_Date">2005-00-18TZ</Field>

<Field Name="Event_x0020_Date">2005-00-03</Field>

But they all return the following response:

<Result ID="603d7824-fdf4-433a-91ba-7a5d4e8e962b,New">

<ErrorCode>0x8102001c</ErrorCode>

<ErrorText>Invalid date/time value

A date/time field contains invalid data. Please check the value and try again.</ErrorText>

</Result>

Sure looks like my error is with the formatting of the data… ideas? From all the docs and posts I’ve seen, it looks correct (but obviously isn’t).

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Laura Walker     Answered On: Jan 08

You are using month 00................

 
Answer #2    Answered By: Deven Ghurye     Answered On: Jan 08

Did you notice that the month is set to zero in all of your examples?

 
Answer #3    Answered By: Kalyan Pujari     Answered On: Jan 08

Yeah, in my infinite wisdom, I realized that after I posted to this list… just as it always is <rolling eyes />.

 
Answer #4    Answered By: Damon Garner     Answered On: Jan 08

Month 00 isn’t  valid. Just thought you’d like to know.

 




Tagged: