Build String Passing Dates Not Working

  • 14 February 2017
  • 2 replies
  • 0 views

Badge +2

I have been using UpdateListItems adding entries to a list that resided in another SharePoint site using a Call Web Service.  So far it works for everything except dates.  I finally got a solution for it to pass over "People" from list to list, but can't figure out transferring a date field.  When I use the example below it does not create a new item (passing information from one date field to another on the new list).  If I remove the line for the "Example date" it works no problem and creates the new list item.  Any ideas how to format dates?

<Batch OnError="Continue" ListVersion="1" >
<Method ID="1" Cmd="New">
<Field Name="ID">{ItemProperty:ID}</Field>
<Field Name="Title">{ItemProperty:Title}</Field>
<Field Name="PMO_x0020_Primary">-1;#{ItemProperty:PMAssigned}</Field>

<Field Name="ExampleDate">{ItemProperty:ExampleDate}</Field>
</Method>
</Batch>


2 replies

Badge +2

I've also tried converting the value and storing it into a variable like so with no luck:

fn-FormatDate(Start Date, MM/dd/yyyy)
My workflow runs, my "Log in history list" shows my output "02/21/2018" but when I add this line as mentioned below to the build string to pass the variable to the other list the list doesn't update.  I can update all other fields just not dates.
Userlevel 5
Badge +14

try to pass date string in ISO format: YYYY-MM-DDTHH:MI:SSZ

Reply