cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in filtering the rows in collection

Miya
Level 5
Hi I hava a collection with 2 columns of datetime format with around 1000 rows. I need to filter the rows in which today falls with the date range of 2 columns. for eg colimn1- 2nd Feb. and colum 2-=20 march. This column should be available after filtering. can some suggest how it can be done?

------------------------------
Miya
------------------------------
2 REPLIES 2

PabloSarabia
Level 11
Hi @Miya

You must to use the Action "​Filter Collection" from the Object "Utility - Collection Manipulation" to filter the Collection.

The syntax looks like this:

"[DateFirst] < '" & Today() &"' AND [DateSecond] > '" & Today() & "'"

There is no "between statement, so you need to use both dates to compare with the Today() function.

15039.png

Hope this helps you, and if this solves the problem, remember mark as the best answer 😄



See you in the community, bye 🙂

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
634726270
------------------------------

John__Carter
Staff
Staff
Assuming the current datetime is  09:30 on the 7th March, I think it will be something like this (you may need to use a different date format to suit your environment).
"'07/03/2022 09:30:00' >= '" & [column1] & " 00:00:00' AND '07/03/2022 09:30:00' <= '" & [column2] & " 23:59:59'"

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------