Solved

Workflow - O365 - Query List using Current Date problem?

  • 30 March 2020
  • 2 replies
  • 74 views

Badge +3

Hi Folks,

 

I have a list in an O365 site which contains task dates (task start and task end). These dates are in short form and site regional is set to English United Kingdom (i.e. date format is dd/MMM/yyyy e.g. 30/03/2020).

 

Am trying to build a site workflow which will be scheduled to query that list for items whose tasks begin on that date (i.e. Task Start Date is equal to Current Date).

 

I have set a date variable to be todays (datToday) as per below screenshot:

7026iBC87135D48E0B133.jpg

That returns a date variable in the format: 30/03/2020 12:51:36

 

When then using a Query List to pull back only items whose Task Start Date is equal to datToday (see below screenshot)

 

7027iDB88DDC4FB9DA005.jpg

 

I get this error: String was not recognized as a valid DateTime.

 

Can anyone please advise me how to build a O365 workflow which queries using a date variable? I've seen plenty of topics concerning use of Build String etc but that does not get around the above error.

 

Thanks 

 

G

 

So using a Query List have constructed this:

 

 

icon

Best answer by GeoffE 30 March 2020, 20:24

View original

2 replies

Badge +3
After much investigation, I've come up with a solution myself which works.

Get the current date as UTC and Task Alert date as calculated date as UTC into UTC variables. Query List works with the UTC value, not the normal Date Time variable. Took ages to work this out (no documentation found advising users that if they Query using a date value against a date time column in a list that it must be a UTC value) 😕
Badge +6
Now if only I could figure out how to do the same in NWC! I finally just gave up and used O365 using your solution. Thank you for posting!

Reply