- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-11-20 09:00 AM
I am having issues around [Utility - Collection Manipulation - Filter Collection] I have a Get Files action which gets all the files from a particular folder and outputs them into a collection in Blue Prism (there are 14 .txt files) I then use the Filter Collection Object to filter this folder "Files" I am trying to only bring back results in the collection for where the "Created" (DateTime) = today or yesterdays date.
Date1( DateTime) FormatDateTime(Today()&" "&LocalTime(),"dd/MM/yyyy") Date2(DateTime) FormatDateTime(DateAdd("9", "-2", Today())&" "&LocalTime(),"dd/MM/yyyy")
Filter Expression : "[Created] <= "&"'" &[Date1]&"' and [Created] >= "&"'" &[Date2]&"'"
There is no Error message and it doesn't output any results. I am thinking that maybe Date1 and Date2 aren't being read as dates perhaps?
Any help on this matter would be greatly appreciated.
Regards,
Gary
--------------------------------------------------Disclaimer: This content was auto-posted from Stackoverflow. The original Stackoverflow question is here Stackoverflow Post, posted by Gary.
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-11-20 11:57 AM
The VBO uses the DataTable.Select method from .NET. To use Date-Values in filter, you need a special syntax. Surround the dates by '#'-signs.
Here are a few examples https://www.csharp-examples.net/dataview-rowfilter/
------------------------------
Tobias Arnold
RPA Developer
ITERGO GmbH
Europe/Duesseldorf
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-11-20 11:57 AM
The VBO uses the DataTable.Select method from .NET. To use Date-Values in filter, you need a special syntax. Surround the dates by '#'-signs.
Here are a few examples https://www.csharp-examples.net/dataview-rowfilter/
------------------------------
Tobias Arnold
RPA Developer
ITERGO GmbH
Europe/Duesseldorf
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
30-11-20 11:07 AM
------------------------------
Happy coding!
Paul
Sweden
------------------------------
Paul, Sweden
(By all means, do not mark this as the best answer!)
