<?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 subtraction logic in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-subtraction-logic/m-p/890968#M12374</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to subtract 14 days from a date variable vCreateDate := '05-14-2015'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this, I tried following the simple method as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET &lt;STRONG&gt;vReloadDate&lt;/STRONG&gt; = Date(&lt;STRONG&gt;$(vCreateDate)&lt;/STRONG&gt;,'MM-DD-YYYY') - 14;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value I receive is '06-01-1894' instead of 14 days being deleted from the vCreateDate variable. I tried using the Interval function but that does not work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 May 2015 17:00:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-19T17:00:46Z</dc:date>
    <item>
      <title>Date subtraction logic</title>
      <link>https://community.qlik.com/t5/App-Development/Date-subtraction-logic/m-p/890968#M12374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to subtract 14 days from a date variable vCreateDate := '05-14-2015'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this, I tried following the simple method as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET &lt;STRONG&gt;vReloadDate&lt;/STRONG&gt; = Date(&lt;STRONG&gt;$(vCreateDate)&lt;/STRONG&gt;,'MM-DD-YYYY') - 14;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value I receive is '06-01-1894' instead of 14 days being deleted from the vCreateDate variable. I tried using the Interval function but that does not work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 17:00:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-subtraction-logic/m-p/890968#M12374</guid>
      <dc:creator />
      <dc:date>2015-05-19T17:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Date subtraction logic</title>
      <link>https://community.qlik.com/t5/App-Development/Date-subtraction-logic/m-p/890969#M12375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this and see if this helps (Change in Red&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;LET &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;vReloadDate&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; = Date(&lt;/SPAN&gt;$(vCreateDate)&lt;SPAN style="color: #ff0000;"&gt;-14&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;,'MM-DD-YYYY')&lt;/STRONG&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;&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;Best,&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;Sunny&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 15:20:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-subtraction-logic/m-p/890969#M12375</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-05-20T15:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date subtraction logic</title>
      <link>https://community.qlik.com/t5/App-Development/Date-subtraction-logic/m-p/890970#M12376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Or this if the above doesn't work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LET &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vReloadDate&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt; = Date(Date#(&lt;/SPAN&gt;$(vCreateDate), 'MM-DD-YYYY') &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;-14&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;,'MM-DD-YYYY')&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 15:21:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-subtraction-logic/m-p/890970#M12376</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-05-20T15:21:52Z</dc:date>
    </item>
  </channel>
</rss>

