Filtering collection using " " as a delimiter

Hi,

I've read a csv file as a collection and I'm trying to mimic the action of a macro in blue prism, I have sorted the data accordingly and I am now looking to filter the data point (which happens to be datetime) by the " " space separating the date and time.
I have this so far:
Left([SortedCollectionCSVDate.InteractionDateTime], 11) = "[InteractionDateTime] ='" & [Today] & "'"


- The 11th index is where the space is.
- I've also tried to use a wildcard i.e "filter using the date 25/01/2020*" but to no avail.

Has anyone got any pointers or direction?
 

gil.silva

Active Member
Hello,

I'm not sure that I understood what you're asking.
But, you can filter a collection looking for rows with Today's date using the following expression:
"column_name like ' "*" & Today() & "* ' "

Note: if the column name has spaces, use brackets: [column name]
 
Hi,

Thanks for your reply.

I've tried to filter the date by today's date and it has worked in the past.
If for instance, I am trying to sort the date by the a previous date, shall I replace 'Today()' with a data Item [DateIAmLookingFor]
 
Hi ,

I may be posing the wrong question here or I may not be asking it correctly.

I have a collection, there is a heading "InteractionDateTime" with the data types like (27/01/2020 09:33)

I'm looking to filter the collection by the first 10/11 characters or "27/01/2020 "

I've tried to split the data field using the delimiter " "

With the example above I've made many attempts to rejig the syntax.

"InteractionDateTime LIKE '" & "*" & [Today] & "*"& "'"

The error returned is that I "can't multiple a string"

Is it possible to insert a wildcard after concatenating the other two inputs?
i.e. the column name & the search criteria & (*)wildcard
 

slrpa

New Member
Hi,
I'm trying to filter a value in excel sheet which i copied to a collection and use the filter collection. The value I would like to search has "["
"[Organization] like '*["&[Code.Name]&"*'"

Sample Code.Name ( I read a column from a collection) is MBB
I'm searching for a value anything with [MBB in between string.

The error I'm getting is "..... Error in Like operator: the string patern '*[MBB*' is invalid."

Please help. Thanks.
 
Top