<?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 Hi Zahib,
 
To get the last… in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Last-date-of-the-month/m-p/85072#M36124</link>
    <description>Hi Zahib,
&amp;nbsp;
To get the last day of month you'll need the following data items as Number
Data Item to store the current month: Month -&amp;gt; to calculate the month you have to use a calc stage and write the expression FormatDate(Today(),""MM"")
Data Item to store the year: Year&amp;nbsp;-&amp;gt; to calculate the year you have to use a calc stage and write the expression FormatDate(Today(),""yyyy"")
Data item to store the days of the month&amp;nbsp; : NumDays
Add a code stage that:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;takes as Input : Month and Year
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gives an Output : NumDays
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; On the code tab write : NumDays = System.Datetime.DaysinMonth(Year,Month)
&amp;nbsp;
Attached find an image of the flow
&amp;nbsp;
&amp;nbsp;</description>
    <pubDate>Wed, 17 Apr 2019 22:34:00 GMT</pubDate>
    <dc:creator>ErgesKokoshi</dc:creator>
    <dc:date>2019-04-17T22:34:00Z</dc:date>
    <item>
      <title>Last date of the month</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Last-date-of-the-month/m-p/85071#M36123</link>
      <description>Hello,&amp;nbsp;

&amp;nbsp;

How to get last day of the month, for example the given date is 16.08.2019 and i would like to get 31.08.2019 in return.

Any ideas and suggestions appreciated.

&amp;nbsp;

BR

Zahib&amp;nbsp;</description>
      <pubDate>Wed, 17 Apr 2019 16:19:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Last-date-of-the-month/m-p/85071#M36123</guid>
      <dc:creator>ZahibSidiq</dc:creator>
      <dc:date>2019-04-17T16:19:00Z</dc:date>
    </item>
    <item>
      <title>Hi Zahib,
 
To get the last…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Last-date-of-the-month/m-p/85072#M36124</link>
      <description>Hi Zahib,
&amp;nbsp;
To get the last day of month you'll need the following data items as Number
Data Item to store the current month: Month -&amp;gt; to calculate the month you have to use a calc stage and write the expression FormatDate(Today(),""MM"")
Data Item to store the year: Year&amp;nbsp;-&amp;gt; to calculate the year you have to use a calc stage and write the expression FormatDate(Today(),""yyyy"")
Data item to store the days of the month&amp;nbsp; : NumDays
Add a code stage that:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;takes as Input : Month and Year
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gives an Output : NumDays
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; On the code tab write : NumDays = System.Datetime.DaysinMonth(Year,Month)
&amp;nbsp;
Attached find an image of the flow
&amp;nbsp;
&amp;nbsp;</description>
      <pubDate>Wed, 17 Apr 2019 22:34:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Last-date-of-the-month/m-p/85072#M36124</guid>
      <dc:creator>ErgesKokoshi</dc:creator>
      <dc:date>2019-04-17T22:34:00Z</dc:date>
    </item>
    <item>
      <title>Hi Zahib,
Your requirement…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Last-date-of-the-month/m-p/85073#M36125</link>
      <description>Hi Zahib,
Your requirement can be achieved using native functions in Blueprism.
Create the following data items:
&amp;nbsp;&amp;nbsp; 1. Of Date type, which stores input date.
&amp;nbsp;&amp;nbsp; 2. Of Number type, which stores the last date of the month.
&amp;nbsp;&amp;nbsp; 3. Of Date type, which stores the required output date.
&amp;nbsp;
Now add a calculation stage with the expression:&amp;nbsp; DateDiff(9, [Date], AddMonths([Date], 1))
Another calculation stage with the expression:&amp;nbsp;MakeDate([Last Day of Current Month], FormatDate([Date], ""MM""), FormatDate([Date], ""yyyy""))
&amp;nbsp;
First function will calculate the number of days difference between two dates:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1. Input date
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2. Date of the same day in the next month.
Second calculation will calculate actual last date of that month.
&amp;nbsp;
Please find the attachments below for better understanding. Hope it helps.
&amp;nbsp;
Thank you.
&amp;nbsp;</description>
      <pubDate>Thu, 18 Apr 2019 02:20:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Last-date-of-the-month/m-p/85073#M36125</guid>
      <dc:creator>SreekarKarna</dc:creator>
      <dc:date>2019-04-18T02:20:00Z</dc:date>
    </item>
    <item>
      <title>Thank you much to both of…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Last-date-of-the-month/m-p/85074#M36126</link>
      <description>Thank you much to both of you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;
&amp;nbsp;
&amp;nbsp;</description>
      <pubDate>Thu, 18 Apr 2019 13:56:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Last-date-of-the-month/m-p/85074#M36126</guid>
      <dc:creator>ZahibSidiq</dc:creator>
      <dc:date>2019-04-18T13:56:00Z</dc:date>
    </item>
  </channel>
</rss>

