<?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 Date Manipulation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273386#M102310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks! This did the trick. We were putting the minus one in the wron paren.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Sep 2011 19:48:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-19T19:48:07Z</dc:date>
    <item>
      <title>Date Manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273382#M102306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are relatively new to QV, but we are having what is probably a simple problem to solve, but the solution is eluding us;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We set a variable to indicate the date today;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vToday=Date(Now());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if it were today, it would read "9/19/11"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and we have one to indicate the date a year ago today;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vTodayLastYear=MakeDate(vCurrentCalendarYrMinusOne, Month(Now()), Day(Now()));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date reads "9/19/10"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is I need it to be "9/18/10" and have been having problems getting the syntax right. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 18:47:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273382#M102306</guid>
      <dc:creator />
      <dc:date>2011-09-19T18:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date Manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273383#M102307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to do some changes in code like &lt;/P&gt;&lt;P&gt;For today date variable it is ok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vToday=Date(Now());&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;It reads 9/20/2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for second code change Day(Now()) - 1 and the complete code is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vTodayLastYear=MakeDate(Year(Now())-1, Month(Now()), Day(Now())-1);&lt;/P&gt;&lt;P&gt;It reads 9/19/2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 19:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273383#M102307</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2011-09-19T19:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date Manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273384#M102308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you want the date 52 weeks back in time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If today is Monday, 2011-09-19, do you want Monday, 2010-09-&lt;STRONG&gt;20?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I would just write&lt;/P&gt;&lt;P&gt;=Date(today()-52*7)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;Anand, your code is fine for most days, but what about if today is one of the first days of a month?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 19:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273384#M102308</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-19T19:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date Manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273385#M102309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;It looks like you want to substract a year to a current date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try following expression to substract a year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=addmonths(Date(Now()),-12)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 19:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273385#M102309</guid>
      <dc:creator />
      <dc:date>2011-09-19T19:19:03Z</dc:date>
    </item>
    <item>
      <title>Date Manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273386#M102310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks! This did the trick. We were putting the minus one in the wron paren.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 19:48:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Manipulation/m-p/273386#M102310</guid>
      <dc:creator />
      <dc:date>2011-09-19T19:48:07Z</dc:date>
    </item>
  </channel>
</rss>

