cancel
Showing results for 
Search instead for 
Did you mean: 

Using type function within filter of collection filter action

bbastien
Level 3

Hello all,

I am currently trying to make a filter for a collection which has a "Date" collumn, and my aim is to get all items for which that date is between the first and 15th of any month and any year. To that end, I assumed that I could use the < and > operands, but I cannot figure out how to get the value specific to the day, and I would like to avoid using a hardcoded value such as "Date LIKE '01/*' OR Date LIKE '02/*'" all the way to 15.

Is there  some expression to get the date's day value and turn it into a number which can be compared directly within the action's filter field ?

Thank you in advance for your returns !

Bastien

1 REPLY 1

MichealCharron
Level 8

@bbastien 

Because you, from your examples, have zero padding in your date format it is fairly easy to apply a filter to pull out the rows you want.

Test Date Collection.jpg

You just have to create a filter string that:

  1. Changes the date to a string.
  2. Extracts the first two numbers from that string.
  3. Checks to see if the extracted numbers are less than 16.

MichealCharron_0-1727399001855.png

"Substring(Convert([Date Column], System.String), 1, 2)<16"

Test Date Collection Out.jpg

 

Micheal Charron
RBC
Toronto, Ontario
Canada