<?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 get  dates and days of week</title><link>https://community.appian.com/discussions/f/new-to-appian/19820/how-to-get-dates-and-days-of-week</link><description>How to get dates and days of week: 
 For example previous week was started on 19th October 2020 and ended on 25th October 2020, 
 So how do we get all days and dates between 19th and 25th, 
 Basically how do we gets to know the days and dates of the week</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to get  dates and days of week</title><link>https://community.appian.com/thread/77517?ContentTypeID=1</link><pubDate>Thu, 29 Oct 2020 18:06:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c26f9771-2fee-40f2-bc34-bc8a643a8f8e</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;This should get you started. Adapt the second line to your needs. To get the first day of the week for any given date you can use the weekday() function und subtract the returned value from the given date. Change the second parameter of weekday() to match your understanding of what the first day of week is.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!forEach(
  items: today() + enumerate(5),
  expression: {
    day: fv!item,
    dow: weekday(fv!item)
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get  dates and days of week</title><link>https://community.appian.com/thread/77513?ContentTypeID=1</link><pubDate>Thu, 29 Oct 2020 14:56:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b4826bd3-1905-488c-8cc4-081b3085d9a8</guid><dc:creator>DaveMC</dc:creator><description>&lt;p&gt;Sorry, still not sure of the requirement. What is the trigger for the system to do something? If you could provide a specification by example that might help. (Given [this context}, when [this event occurs], then the system [should do this])&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get  dates and days of week</title><link>https://community.appian.com/thread/77512?ContentTypeID=1</link><pubDate>Thu, 29 Oct 2020 14:48:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:55029142-0b6e-4466-bae9-915165c9f53b</guid><dc:creator>salmak0003</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the suggestion&lt;/p&gt;
&lt;p&gt;Here your taking definate dates&lt;/p&gt;
&lt;p&gt;But my requirement is to get week start and end dates dynamically&lt;/p&gt;
&lt;p&gt;For example start and end date for future weeks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get  dates and days of week</title><link>https://community.appian.com/thread/77511?ContentTypeID=1</link><pubDate>Thu, 29 Oct 2020 14:44:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3b60d4d8-f331-4d25-b537-94d6b92c0df9</guid><dc:creator>DaveMC</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Not exactly sure of the requirement but would something like this work. Local Start and End dates would become rule inputs of course. But this will return a list of dates that you could then query/manipulate in any way you wanted.&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt;&amp;nbsp; local!start: fn!date(2020, 10, 19),&lt;br /&gt;&amp;nbsp; local!end: fn!date(2020, 10, 25),&lt;br /&gt;&amp;nbsp; local!numberOfDays: tointeger((local!end - local!start) + 1),&lt;br /&gt;&amp;nbsp; local!dateList: repeat(local!numberOfDays, local!start),&lt;br /&gt;&amp;nbsp; a!forEach(&lt;br /&gt;&amp;nbsp; &amp;nbsp; items: local!dateList,&lt;br /&gt;&amp;nbsp; &amp;nbsp; expression: fv!item + (fv!index-1)&lt;br /&gt;&amp;nbsp; )&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>