<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to create a filter to get data by day and month?</title><link>https://community.appian.com/discussions/f/general/27403/how-to-create-a-filter-to-get-data-by-day-and-month</link><description>Hello. I currently have a database table with thousands of news from different dates. I would like to create a query that brings me the news by days and by month, but not by year. For example, the news of July 4 from different years. Thank you for your</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to create a filter to get data by day and month?</title><link>https://community.appian.com/thread/107405?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2023 13:01:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bf021b65-3445-4749-82fb-5df4bf2d5e59</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Although others gave suggestions for doing this in the database, I would suggest using syced records and custom record fields to achieve this instead. If you enable data sync, you could create a custom field that returns the month and day, something like this:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;datetext(ri!date, &amp;quot;MMMM d&amp;quot;)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then, you can use that in queries. For instance, you could aggregate on that custom field to find the count of news by each day + month.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a filter to get data by day and month?</title><link>https://community.appian.com/thread/107372?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2023 04:36:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:316c579c-3733-4ab4-8720-0a7a0bc89f17</guid><dc:creator>Maria</dc:creator><description>&lt;p&gt;You can create a query to bring news by day and by month, but not by year, by using the &amp;quot;GROUP BY&amp;quot; clause in SQL. Here&amp;#39;s an example using MySQL:&lt;/p&gt;
&lt;div class="bg-black mb-4 rounded-md"&gt;
&lt;div class="flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans"&gt;&lt;/div&gt;
&lt;div class="p-4 overflow-y-auto"&gt;&lt;pre class="ui-code" data-mode="text"&gt;SELECT 
    DAY(date_column) AS day, 
    MONTH(date_column) AS month, 
    COUNT(*) AS total 
FROM 
    your_table 
GROUP BY 
    DAY(date_column), 
    MONTH(date_column) 
ORDER BY 
    month, day
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this example, &lt;code&gt;date_column&lt;/code&gt; is the name of the column in your database table that stores the dates of the news. The query first extracts the day and month from each date in the &lt;code&gt;date_column&lt;/code&gt; using the &lt;code&gt;DAY&lt;/code&gt; and &lt;code&gt;MONTH&lt;/code&gt; functions, respectively &lt;span style="color:#333333;"&gt;&lt;a style="color:#333333;" href="https://geometrydashlite.io"&gt;geometry dash lite&lt;/a&gt;&lt;/span&gt;. The &lt;code&gt;GROUP BY&lt;/code&gt; clause then groups the data by the extracted day and month, and the &lt;code&gt;COUNT&lt;/code&gt; function counts the number of news for each group. The query results will be ordered by the month and day.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a filter to get data by day and month?</title><link>https://community.appian.com/thread/107347?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 16:44:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:84f47310-c3d4-4afa-9bdd-e0e994ac8c4f</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Agree with Stefan, in MSSQL for example we can create a view that utilizes DATEPART() over a datetime field to break out day, month and year integers to be used in report filtering.&lt;/p&gt;
&lt;p&gt;Just note that this does bypass Appian&amp;#39;s auto conversion of datetime values stored as GMT in your database, so the day, month, year will be GMT and not local time, unless you add a mechanism to the DB such as a function to convert to a specific timezone.&amp;nbsp; Likely not that big of a deal for this use case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a filter to get data by day and month?</title><link>https://community.appian.com/thread/107336?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 14:53:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c09d7769-5937-4544-8af3-6c656253fb09</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You could create a view in the DB to separate the three values from the date into three fields and then query each individually. With Appian synced records, this should also work pretty easily.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>