<?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: wrong evaluation of a date expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120328#M919695</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps the expressions you need are&lt;BR /&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MonthName(Max(Month)) and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MonthName(Max(Month), -1) to return year/month values, or&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Month(Max(Month)) and Month(AddMonths(Max(Month), -1)) to return month only values&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 May 2016 13:25:26 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2016-05-12T13:25:26Z</dc:date>
    <item>
      <title>wrong evaluation of a date expression</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120320#M919687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I m trying to find the current month and the prcedent one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for current month I worked with this expression and it done well : MonthName(Max(Month))&lt;/P&gt;&lt;P&gt;But for the Precedent Month this expression return a number&amp;nbsp; : (Max(Month)-1) =42095&lt;/P&gt;&lt;P&gt;and this one (= MonthName((Max(Month))-1)) return the same result as (MonthName(Max(Month))).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120320#M919687</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: wrong evaluation of a date expression</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120321#M919688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;MonthName(AddMonths(Max(Month), -1))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 17:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120321#M919688</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-11T17:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: wrong evaluation of a date expression</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120322#M919689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Try MonthName(Max(Month,2))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 17:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120322#M919689</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-05-11T17:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: wrong evaluation of a date expression</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120323#M919690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;that "MonthName(Max(Month))" is working for you means that "Month" holds date values.&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Subtracting 1 from a date value again means subtracting one day, even if this field is called Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One solution might be to use the "shift" parameter of the MonthName() function to return the previous month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14629998580488340 jive_text_macro" jivemacro_uid="_14629998580488340"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MonthName(Max(Month),-1)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;hope this helps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Marco&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 20:51:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120323#M919690</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-05-11T20:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: wrong evaluation of a date expression</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120324#M919691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you .&lt;/P&gt;&lt;P&gt;It work but return "Nov.2015"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 08:51:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120324#M919691</guid>
      <dc:creator />
      <dc:date>2016-05-12T08:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: wrong evaluation of a date expression</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120325#M919692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you but it didn't return any result '-'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 08:53:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120325#M919692</guid>
      <dc:creator />
      <dc:date>2016-05-12T08:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: wrong evaluation of a date expression</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120326#M919693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;This solution work too but with the same problem as SunnyT's proposition it return the date like this 'Nov.2015' and I need only the month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 08:58:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120326#M919693</guid>
      <dc:creator />
      <dc:date>2016-05-12T08:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: wrong evaluation of a date expression</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120327#M919694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I findet &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I should like this write my expression : &lt;SPAN style="font-size: 13.3333px;"&gt;date((MonthName(Max(Month),-1)),'MM') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;but&amp;nbsp; why this&amp;nbsp; &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;MonthName(AddMonths(Max(Month), -1)) return the years too !&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 09:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120327#M919694</guid>
      <dc:creator />
      <dc:date>2016-05-12T09:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: wrong evaluation of a date expression</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120328#M919695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps the expressions you need are&lt;BR /&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MonthName(Max(Month)) and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MonthName(Max(Month), -1) to return year/month values, or&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Month(Max(Month)) and Month(AddMonths(Max(Month), -1)) to return month only values&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 13:25:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-evaluation-of-a-date-expression/m-p/1120328#M919695</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-05-12T13:25:26Z</dc:date>
    </item>
  </channel>
</rss>

