# Is there any bug on date filter?

**URL:** <https://community.make.com/t/is-there-any-bug-on-date-filter/26026>\
**Category:** Questions\
**Tags:** filters\
**Created:** [January 31, 2024, 1:19pm UTC](https://community.make.com/t/is-there-any-bug-on-date-filter/26026 "2024-01-31T13:19:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivien\_Chantrel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/vivien_chantrel/32/18996_2.png) [@Vivien\_Chantrel](https://community.make.com/u/Vivien_Chantrel)\
**Post date:** [January 31, 2024, 1:19pm UTC](https://community.make.com/t/is-there-any-bug-on-date-filter/26026/1 "2024-01-31T13:19:08Z")

</div>

Hello all,

I have a problem, understanding date filter. It was working with test but in my scenario, it does not filter correctly at all.

Please check the screenshot as you can see what is wrong.

Whatever if its earlier or after, it does not compare at all correctly the date.

 ![Capture d’écran 2024-01-31 à 14.12.24](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/e/e/eef3ab0aada23ea24cf9e5fe034662079f6d95b6.png)  
 ![Capture d’écran 2024-01-31 à 14.12.31](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/9/095a04474770c589357ad4ef11ada7f72b0fbe83.png)  
 ![Capture d’écran 2024-01-31 à 14.12.37](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/e/d/eddb4f2766fa21b94319c9ab6ab05d0d3f4d9246.png)

As you can see, “Date d’arrivée” is 18/09/2023, one bundle has as a date 10/09/2023 which is not later than 18/09/2023. So why does it pass the filter ?

You can see below my filter. I’ve tried many test, it was working correctly so i guess having understood how does it work. But in this case, i don’t know what happens.

 ![Capture d’écran 2024-01-31 à 14.15.05](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/9/297f0049f133e1ee56fb992c02982e91b4e08b97.png)

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![ttt](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@ttt](https://community.make.com/u/ttt)\
**Post date:** [January 31, 2024, 2:15pm UTC](https://community.make.com/t/is-there-any-bug-on-date-filter/26026/3 "2024-01-31T14:15:23Z")

</div>

Make seems to assume USA date format in most cases. However, if a date makes no sense in USA format it will then try UK/EU format (bizarreley!). So at a guess it is reading 10/09/2023 as 9th October 2023 and 18/09/2023 as 18th September 2023 (as there is no 18th month).

The only fix is to parse the date specifying the format before comparing.

---

<div class="post-metadata">

**Author:** ![Abhishek](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/abhishek/32/29250_2.png) [@Abhishek](https://community.make.com/u/Abhishek)\
**Post date:** [January 31, 2024, 2:17pm UTC](https://community.make.com/t/is-there-any-bug-on-date-filter/26026/4 "2024-01-31T14:17:29Z")

</div>

Hey @Vivien_Chantrel

Use format date in Filters.  
like this  
 ![Screenshot 2024-01-31 194549](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/e/5/e533f6aea61dc3622d4b0e71d8308f1f6b19add8.png)

result

![Screenshot 2024-01-31 193623](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/e/c/ecd6983b487b9e42402ef44d794a58df62f29607.png)

in result we will get  
 ![Screenshot 2024-01-31 193608](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/d/2da9e8f754484cf39dc558fdc7a1795051d60418.png)

![Screenshot 2024-01-31 193729](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/0/60db797793636997c00f2e3ecbaaa9122bdebb25.png)

---

<div class="post-metadata">

**Author:** ![ttt](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@ttt](https://community.make.com/u/ttt)\
**Post date:** [January 31, 2024, 2:40pm UTC](https://community.make.com/t/is-there-any-bug-on-date-filter/26026/5 "2024-01-31T14:40:05Z")

</div>

Should this not be “parseDate” rather than “formatDate”?

---

<div class="post-metadata">

**Author:** ![ttt](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@ttt](https://community.make.com/u/ttt)\
**Post date:** [January 31, 2024, 3:05pm UTC](https://community.make.com/t/is-there-any-bug-on-date-filter/26026/6 "2024-01-31T15:05:03Z")

</div>

@Vivien_Chantrel try pasting the extract below to see what I mean:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/7/b/7beacec167f9b960bf1a2f834204157e2f2967f7.png)

![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/a/6aa75ce9aa5b661acc7305da1480c44668807c3a.png)

{  
“subflows”: [  
{  
“flow”: [  
{  
“id”: 1,  
“module”: “util:SetVariables”,  
“version”: 1,  
“parameters”: {},  
“mapper”: {  
“variables”: [  
{  
“name”: “d1”,  
“value”: “{{formatDate("10/09/2023"; "DD-MMM-YYYY")}}”  
},  
{  
“name”: “d2”,  
“value”: “{{formatDate("18/09/2023"; "DD-MMM-YYYY")}}”  
}  
],  
“scope”: “roundtrip”  
},  
“metadata”: {  
“designer”: {  
“x”: 102,  
“y”: 177  
},  
“restore”: {  
“expect”: {  
“variables”: {  
“items”: [  
null,  
null  
]  
},  
“scope”: {  
“label”: “One cycle”  
}  
}  
},  
“expect”: [  
{  
“name”: “variables”,  
“type”: “array”,  
“label”: “Variables”,  
“spec”: [  
{  
“name”: “name”,  
“label”: “Variable name”,  
“type”: “text”,  
“required”: true  
},  
{  
“name”: “value”,  
“label”: “Variable value”,  
“type”: “any”  
}  
]  
},  
{  
“name”: “scope”,  
“type”: “select”,  
“label”: “Variable lifetime”,  
“required”: true,  
“validate”: {  
“enum”: [  
“roundtrip”,  
“execution”  
]  
}  
}  
],  
“interface”: [  
{  
“name”: “d1”,  
“label”: “d1”,  
“type”: “any”  
},  
{  
“name”: “d2”,  
“label”: “d2”,  
“type”: “any”  
}  
]  
}  
}  
]  
}  
],  
“metadata”: {  
“version”: 1  
}  
}

---

<div class="post-metadata">

**Author:** ![Abhishek](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/abhishek/32/29250_2.png) [@Abhishek](https://community.make.com/u/Abhishek)\
**Post date:** [January 31, 2024, 3:48pm UTC](https://community.make.com/t/is-there-any-bug-on-date-filter/26026/7 "2024-01-31T15:48:24Z")

</div>

@ttt  
Yes you can but I tried with format date and it is working properly.  
It will solve this problem I think

---

<div class="post-metadata">

**Author:** ![Vivien\_Chantrel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/vivien_chantrel/32/18996_2.png) [@Vivien\_Chantrel](https://community.make.com/u/Vivien_Chantrel)\
**Post date:** [January 31, 2024, 5:09pm UTC](https://community.make.com/t/is-there-any-bug-on-date-filter/26026/8 "2024-01-31T17:09:42Z")

</div>

Thanks a lot for your answer.

I appreciate !

I already open a topic about this and I think @Abhishek answered me a that moment. So thanks again for your help. 🙏

Indeed it worked… But I don’t know why it was working before with EU format for so many invoice that I parsed with… It worked for so many of them and those one was not working, probably it was coincidence but…

I’ll use everytime the formatDate() to be sure now to avoid this…

(btw, I did some try with variables modules and it was working so I have no clue what happened.)

Anyway, the lessons is to use always the formatDate(). Won’t forget about it…

Have a great day both !

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [February 14, 2024, 5:16pm UTC](https://community.make.com/t/is-there-any-bug-on-date-filter/26026/9 "2024-02-14T17:16:56Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


