I configured a Office 365 query action to return items filtered by a date range. The filter criteria was simple, give me everything with a [eventdate] greater then or equal to [UserEnteredStartDate] and [EventDate] less than or equal to [UserEnteredEndDate] but I got zero result. After investigating I determine that the date format returned in the Office 365 query action was "yyyy-MM-dd h:mm AM/PM" and the format in the current list item date/time field was "M/dd/yyyy h:mm AM/PM" and that was why the filter criteria did not work. By entering a date range with the expected format, I get results. I will post a link to my blog explaining my work-around to this issue but wanted to ask, why is the date format used in the Office 365 query list action different from that in a date/time field value in Office 365? and is there a way to tell this action what format to expect/process when configuring the action?
This is happening because the action expects XML for the DateTime field. If you review the format of a DateTime field in XML it expects the format: "YYYY-MM-DDThh:mm:ss". You can review the following article for DateTime formatting: XML Schema Date/Time Datatypes .
Thanks Andrew! I have a better understanding on what is happening behind the seen. Do you know if there is any plans to make the DateTime format configurable so that an end user can to the O365 Query list action what format to expect?