Query list filter by date returns empty result

  • 20 May 2015
  • 6 replies
  • 339 views

Badge +8

So I'm trying to return items from a list that their notification date is equal to today's date.

Here's my list details -> ListA: itemname(text), duedate(date), notificationdate(date)

     notificationdate item default value is based on duedate - 4 months

    

 

In nintex WF designer, I did the following:

     1. Create a variable named todaysdate to store the current date value

     2. I added query list action to filter items when the notificationdate is equal to the current date(todaysdate)

 

However, when I run the query, it returns empty result although I checked that today's date matches the notificationdate value. and even when I enter the date manually exactly how its shown in ListA, it still returns empty result.

 

Untitled2.png

 

Untitled3.png


6 replies

Badge +6

Have you tried to find your answer in this thread :

https://community.nintex.com/message/7679#7679

or this blog :

https://community.nintex.com/community/build-your-own/blog/2015/01/15/how-to-query-sharepoint-list-item-that-were-modified-in-last-x-days-with-nintex-workflow

It seems you are trying to achieve the same thing!

Badge +8

Yes, actually I have looked at these two links. I followed exactly solution 2 of How to Query SharePoint List Item that were modified in Last X Days with Nintex Workflow? 

However, for some reason, it still returns empty result...

I spent hours investigating this and finally found that the date is in the wrong format... it should be like this yyyy-MM-ddTHH🇲🇲ssZ

Now I'm trying to use fn-dateformat function to format the current date but its not working properly

Badge +6

Be carefull with the "equal to" statement, cause it may try to look for a date (AND TIME) equality!

How have you configured you fields?

have you tried with a "greater than" instead?

Badge +8

Yes, at this stage, I have tried everything... Still returns an empty result.

The problem is within the date format it should be yyyy-MM-ddTHH:mm:ssZ instead of MM/dd/yyyy HH:mm:ss.

The date format function is not helping at all.

Badge +8

Any idea why it accepts this format only "yyyy-MM-ddTHH:mm:ssZ"? I checked my server

s date and time format and it's not the same.

and why the date format function isn't functioning properly? It returns this "fn-dateFormat(5/24/2015, 'dd/mm/yyyy')" and not the value or even empty string..

Badge +3

Hello,


thank you so much you helped me a lot. I've been investigating for a few hours why Europe date in this format (12. 8. 2021) does not return any output until I found your solution to use this format (yyyy-MM-dd). Now, it returns what I wanted.


Before the query I built a string with a variable in which I firstly store "today's date" and then use this formula: fn-FormatDate({Common:CurrentDate},yyyy-MM-dd)


Thanks, Steo


 


 

Reply