cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Query List using datetime search

Jump to solution

Hello All,

 

I have a Site Workflow that is doing a Query List to try and bring back Items that have been created over 10 minutes ago.

 

This initially populates a datetime workflow variable using the Calculate Date action - using the date when Action runs - including the time and subtracting 10 minutes.

 

However when I use this value within the 'Query List' action and look for any items with a Create Date less than this datetime variable - the results will only pick up Items that have a Create Date at least of the previous day.  This does not seem to take account of any items that are created earlier in the day.  It doesnt seem to be taking into account the time of the datetime value.

 

Can anyone give me any tips?

 

Thanks

 

Colin

Labels: (2)
0 Kudos
Reply
4 Replies
Not applicable

Re: Query List using datetime search

Jump to solution


Just to expand on this my Query List filter is as below:-

Query List.jpg

The Query Date Time workflow variable is populate within a Calculate Date action as below

Calculate Date.jpg

0 Kudos
Reply
Workflow Hero

Re: Query List using datetime search

Jump to solution

Hi Colin McCudden

You are almost there, only 2 more steps to go

1 - Use the ISO8601 date string for the filter

In the "Calculate date" action, you need to store the ISO8601 date string into a 'single line of text' variable.

The date will be represented in this format: yyyy-MM-ddTHH:mm:ssZ

CalculateDate-8601.png

2 - Use the CAML editor to change the CAML query to update the value node with "IncludeTimeValue" as "True"

Edit the "Query list" action and select the "CAML editor" option to switch to CAML editor mode.

In the Created filter, add the "IncludeTimeValue" property in the "Value" node, IncludeTimeValue='True'

Confirm that the reference variable is updated to use the ISO8601 string returned from calculate date.

CamlEditor-IncludeTimeValue.png

Reply
Not applicable

Re: Query List using datetime search

Jump to solution

Hi Danny,

I have applied your suggested solution to my Workflow and this is now working like a dream.

Thanks for your help - much appreciated.

Thanks

Colin

0 Kudos
Reply
Not applicable

Re: Query List using datetime search

Jump to solution

Many thanks!


I have just started to work with office 365 version after spending 3 years on creation different workflows in full Nintex version. Damn, it is so hard to readjust! There is no straight saving in ISO format here

0 Kudos
Reply