<?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 Trouble with Dates in the future !! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588396#M1114281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When i force a date using the Addmonths function the data doesnt join as the Function seems to return decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MonthEnd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())+1),0)&amp;nbsp; seems to return 41699.999999988&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;To join to all my other date i guess it needs to be an Integer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;How do i acheive this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Feb 2014 16:53:52 GMT</pubDate>
    <dc:creator>timsaddler</dc:creator>
    <dc:date>2014-02-14T16:53:52Z</dc:date>
    <item>
      <title>Trouble with Dates in the future !!</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588396#M1114281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When i force a date using the Addmonths function the data doesnt join as the Function seems to return decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MonthEnd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())+1),0)&amp;nbsp; seems to return 41699.999999988&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;To join to all my other date i guess it needs to be an Integer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;How do i acheive this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 16:53:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588396#M1114281</guid>
      <dc:creator>timsaddler</dc:creator>
      <dc:date>2014-02-14T16:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Dates in the future !!</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588397#M1114286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;MonthEnd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;())+1),0) &lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 16:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588397#M1114286</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-02-14T16:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Dates in the future !!</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588398#M1114290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strange, maybe better with Floor(Today()) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 17:00:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588398#M1114290</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-02-14T17:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Dates in the future !!</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588399#M1114294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's because monthend() returns the last date and the last possible time of the month:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;MonthEnd(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="Italic"&gt;date [, shift = 0]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Returns a value corresponding to a timestamp with the last millisecond of the last date of the month containing &lt;SPAN class="Italic"&gt;date&lt;/SPAN&gt;. The default output format will be the DateFormat set in the script. &lt;SPAN class="Italic"&gt;Shift&lt;/SPAN&gt; is an integer, where the value 0 indicates the month which contains &lt;SPAN class="Italic"&gt;date&lt;/SPAN&gt;. Negative values in &lt;SPAN class="Italic"&gt;shift&lt;/SPAN&gt; indicate preceding months and positive values indicate succeeding months. &lt;/P&gt;
&lt;P class="example"&gt;&lt;STRONG&gt;Examples:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;monthend ( '2001-02-19' )&lt;/SPAN&gt; returns '2001-02-28' with an underlying numeric value corresponding to '&lt;STRONG&gt;2001-02-28 23:59:59.999&lt;/STRONG&gt;'&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;monthend ( '2001-02-19', -1 )&lt;/SPAN&gt; returns '2001-01-31' with an underlying numeric value corresponding to '&lt;STRONG&gt;2001-01-31 23:59:59.999&lt;/STRONG&gt;'&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to use floor() like &lt;A href="https://community.qlik.com/qlik-users/3136"&gt;Ralf Becher&lt;/A&gt; suggested, but it needs to be around the monthend() function instead of the today() function:&lt;/P&gt;&lt;P&gt;Addmonths(Date(Floor(MonthEnd(today()))+1),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also not sure why you're using the AddMonths() function if you're not adding or subtracting any months...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 20:44:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588399#M1114294</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-02-14T20:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Dates in the future !!</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588400#M1114297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just adding to what's already been said, I think the problem is the order of the functions, you typed this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;MonthEnd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;())+1),0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The thing here is that Date would be placed first, because no matter what tranformations you make to &lt;STRONG&gt;today(), &lt;/STRONG&gt;at the end you want to get a &lt;STRONG&gt;date. Also is not the same to add a month and then getting the end of the month than getting the end of the month and then adding a month:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;today() = february 14 -&amp;gt; date(MonthEnd(addmonths(today(), 1)) will return &lt;STRONG&gt;march 31st (31/03/2014 asuming date is set to DD/MM/YYYY)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;today() = february 14 -&amp;gt; date(Addmonths(MonthEnd(Today()), 1)) will return &lt;STRONG&gt;march 28th (28/02/2014 assuming date is set to DD/MM/YYYY)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2014 00:08:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588400#M1114297</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-02-15T00:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Dates in the future !!</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588401#M1114302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still not sure what you're trying to get here. Perhaps the beginning of the next month?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=MonthStart(AddMonths(Today(),1))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2014 20:20:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Dates-in-the-future/m-p/588401#M1114302</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-02-15T20:20:48Z</dc:date>
    </item>
  </channel>
</rss>

