<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: Filtering a collection by date in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48726#M4226</link>
    <description>Thank you for the examples, I appreciate it. But can you give me an idea of what it would look like if you need to filter a specific column in the collection according to a data item?&lt;BR /&gt;This works: "[Created]='05.08.2019 13.20.28'"&amp;nbsp; &amp;nbsp;It finds the one row that has this exact date and time in it. But I need it to filter according to the value in a another data item containing today's date.&amp;nbsp;&lt;BR /&gt;But if it try "[Created]=[Todays date]" It tells me it can't find the column "Todays date" and if I try&amp;nbsp; "[Created]='[Todays date]'" I get:"ERROR: Internal : Could not execute code stage because exception thrown by code stage: Cannot perform '=' operation on System.DateTime and System.String."&lt;BR /&gt;&lt;BR /&gt;Is there any way around this?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Johanna Westlund&lt;BR /&gt;RPA manager&lt;BR /&gt;MAIK AS&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Wed, 07 Aug 2019 06:26:00 GMT</pubDate>
    <dc:creator>johwes</dc:creator>
    <dc:date>2019-08-07T06:26:00Z</dc:date>
    <item>
      <title>Filtering a collection by date</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48724#M4224</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;I need to filter a collection using today's date. The collection consists of files, all filenames contain month and year but not date. But the create date (with date and time) is listed in a column in the collection. I know which date I want, but the time can be different from time to time, obviously. .&amp;nbsp;&amp;nbsp;&lt;BR /&gt;So I created this expression in the filter of the Filter Collection action in Utility - Collection Manipulation:&lt;BR /&gt;StartsWith([Files found.Created]; FormatDate(Today(); "dd.MM.yyyy"))&lt;BR /&gt;&lt;BR /&gt;When I evaluate this expression it works perfectly by giving me False on a file from yesterday and True on a file from today. But when running the collection through a loop it ends up writing both files to the Output collection.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Someone then told me that the filter has a specific syntax, but I can't find any information about it. You'd think there was some sort of guide somewhere but apparently not.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So, any good ideas? I gotta say I thought something as simple as searching for a file based on date could be found in the File Management utility but nope. No such luck.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Johanna Westlund&lt;BR /&gt;RPA manager&lt;BR /&gt;MAIK AS&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Aug 2019 11:11:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48724#M4224</guid>
      <dc:creator>johwes</dc:creator>
      <dc:date>2019-08-06T11:11:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filtering a collection by date</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48725#M4225</link>
      <description>​Hi Johanna, &lt;BR /&gt;&lt;BR /&gt;Here are couple of examples to Filter collection which&amp;nbsp;can be&amp;nbsp;found in Process Examples - Collections &lt;BR /&gt;&lt;BR /&gt;"[Product Type]='Vegetable'"&lt;BR /&gt;&lt;BR /&gt;"[Product Name] LIKE 'P%'"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you, &lt;BR /&gt;Raj&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Rajesh kumar Muthineni&lt;BR /&gt;RPA Developer&lt;BR /&gt;Highmark Health&lt;BR /&gt;America/Chicago&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Aug 2019 13:43:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48725#M4225</guid>
      <dc:creator>rajeshkumarmuthineni</dc:creator>
      <dc:date>2019-08-06T13:43:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filtering a collection by date</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48726#M4226</link>
      <description>Thank you for the examples, I appreciate it. But can you give me an idea of what it would look like if you need to filter a specific column in the collection according to a data item?&lt;BR /&gt;This works: "[Created]='05.08.2019 13.20.28'"&amp;nbsp; &amp;nbsp;It finds the one row that has this exact date and time in it. But I need it to filter according to the value in a another data item containing today's date.&amp;nbsp;&lt;BR /&gt;But if it try "[Created]=[Todays date]" It tells me it can't find the column "Todays date" and if I try&amp;nbsp; "[Created]='[Todays date]'" I get:"ERROR: Internal : Could not execute code stage because exception thrown by code stage: Cannot perform '=' operation on System.DateTime and System.String."&lt;BR /&gt;&lt;BR /&gt;Is there any way around this?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Johanna Westlund&lt;BR /&gt;RPA manager&lt;BR /&gt;MAIK AS&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Aug 2019 06:26:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48726#M4226</guid>
      <dc:creator>johwes</dc:creator>
      <dc:date>2019-08-07T06:26:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filtering a collection by date</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48727#M4227</link>
      <description>From what I understand from your question you're trying to filter out Datetime if so try this in filter, Data 2 is Datetime from and Date 3 is Datetime to.&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-markup"&gt;"Created &amp;gt;'"&amp;amp;[Data2] &amp;amp;"' and Created&amp;lt;'"&amp;amp;[Data3] &amp;amp;"'"​&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gopal Bhaire&lt;BR /&gt;Analyst&lt;BR /&gt;Accenture&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Aug 2019 07:07:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48727#M4227</guid>
      <dc:creator>GopalBhaire</dc:creator>
      <dc:date>2019-08-07T07:07:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filtering a collection by date</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48728#M4228</link>
      <description>&lt;P&gt;Also Try this one "[Date] LIKE "&amp;amp;"'"&amp;amp;[Today]&amp;amp;"%'". Tested its working&lt;BR /&gt;&lt;BR /&gt;Collection name - COL and Fieldname - Date&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Rajesh kumar Muthineni&lt;BR /&gt;RPA Developer&lt;BR /&gt;Highmark Health&lt;BR /&gt;America/Chicago&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Aug 2019 13:24:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48728#M4228</guid>
      <dc:creator>rajeshkumarmuthineni</dc:creator>
      <dc:date>2019-08-07T13:24:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filtering a collection by date</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48729#M4229</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Set Date1 to Today's Date&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Set Date2 to Tomorrow's Date&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Set Date1: FormatDateTime(Today()&amp;amp;" "&amp;amp;LocalTime(),"MM/dd/yyyy")&lt;BR /&gt; &lt;BR /&gt; Set Date2:&amp;nbsp;FormatDateTime(DateAdd("9", "1", Today())&amp;amp;" "&amp;amp;LocalTime(),"MM/dd/yyyy")&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Use this in the filter condition&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt; Filer Condition:&amp;nbsp;"[Created] &amp;gt; "&amp;amp;"'" &amp;amp;[Date1]&amp;amp;"' and [Created] &amp;lt; "&amp;amp;"'" &amp;amp;[Date2]&amp;amp;"'"&lt;BR /&gt;&lt;BR /&gt;This filter the files which are created Today. If you want to filter the files with different dates, set Date 1 and Date 2 to those dates.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sandeep Nalla&lt;BR /&gt;Senior Consultant&lt;BR /&gt;Lateetud Inc&lt;BR /&gt;America/New_York&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Aug 2019 16:16:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48729#M4229</guid>
      <dc:creator>SandeepNalla</dc:creator>
      <dc:date>2019-08-07T16:16:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filtering a collection by date</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48730#M4230</link>
      <description>Thank you &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/28975"&gt;@SandeepNalla&lt;/a&gt;. I tried this but get the following error: "Could not execute code stage because exception thrown by code stage: Cannot perform '&amp;lt;' operation on System.DateTime and System.String."&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Johanna Westlund&lt;BR /&gt;RPA manager&lt;BR /&gt;MAIK AS&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Aug 2019 12:31:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48730#M4230</guid>
      <dc:creator>johwes</dc:creator>
      <dc:date>2019-08-14T12:31:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filtering a collection by date</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48731#M4231</link>
      <description>Date1 and Date2 data items should be of type "date time". I think you have them as text.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sandeep Nalla&lt;BR /&gt;Senior Consultant&lt;BR /&gt;Lateetud Inc&lt;BR /&gt;America/New_York&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Aug 2019 13:03:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48731#M4231</guid>
      <dc:creator>SandeepNalla</dc:creator>
      <dc:date>2019-08-14T13:03:00Z</dc:date>
    </item>
    <item>
      <title>RE: Filtering a collection by date</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48732#M4232</link>
      <description>&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;Hi &lt;A class="user-content-mention" data-sign="@" data-contactkey="ffc49b4b-3c88-41e4-a793-3e8de2dad908" data-tag-text="@Rajesh Kumar" href="https://community.blueprism.com/network/profile?UserKey=ffc49b4b-3c88-41e4-a793-3e8de2dad908" data-itemmentionkey="a89a4c44-b17b-4b0e-b554-0724ae6710e4"&gt;@Rajesh Kumar&lt;/A&gt;. I get this error message. Any idea?&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="25703.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/25834iD9843FF8B7241582/image-size/large?v=v2&amp;amp;px=999" role="button" title="25703.png" alt="25703.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Johanna Westlund&lt;BR /&gt;RPA manager&lt;BR /&gt;MAIK AS&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Aug 2019 13:04:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Filtering-a-collection-by-date/m-p/48732#M4232</guid>
      <dc:creator>johwes</dc:creator>
      <dc:date>2019-08-14T13:04:00Z</dc:date>
    </item>
  </channel>
</rss>

