<?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: Inline any date (i.e. '01-03-2011') and subtract 90 days in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265795#M99910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SET DateFormat='MM-DD-YYYY';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(EndDate-90) as StartDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;EndDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;01-03-2011&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Nov 2011 20:10:21 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-11-29T20:10:21Z</dc:date>
    <item>
      <title>Inline any date (i.e. '01-03-2011') and subtract 90 days</title>
      <link>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265794#M99909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all.&amp;nbsp; I'm new to this still.&amp;nbsp; I need to create a report inputing different dates (i.e. 01-03-2011) and be able to subtract 90 days from that date.&amp;nbsp; I'm having problems determining what format QV will understand in order to do this.&amp;nbsp; I have an inline input table for my date in that format, MM-DD-YYYY.&amp;nbsp; Or, even if I hardcode the date in the code, how can I format the date in order to use it as the end date, then determine my start date, 90 days prior?&amp;nbsp; Thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 19:54:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265794#M99909</guid>
      <dc:creator />
      <dc:date>2011-11-29T19:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Inline any date (i.e. '01-03-2011') and subtract 90 days</title>
      <link>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265795#M99910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SET DateFormat='MM-DD-YYYY';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(EndDate-90) as StartDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;EndDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;01-03-2011&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 20:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265795#M99910</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-29T20:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inline any date (i.e. '01-03-2011') and subtract 90 days</title>
      <link>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265796#M99911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; That's great John.&amp;nbsp; I like that format.&amp;nbsp; How about if I want to create two variables.&amp;nbsp; One with the StartDate of 90 days prior and one with the hardcoded date?&amp;nbsp; I guess, I don't know how to reference that table date when I do my SQL selection criteria.&amp;nbsp; A variable would work better.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 20:22:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265796#M99911</guid>
      <dc:creator />
      <dc:date>2011-11-29T20:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Inline any date (i.e. '01-03-2011') and subtract 90 days</title>
      <link>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265797#M99912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're hardcoding just two dates, and only want to use them in SQL, why create a table or variable at all?&amp;nbsp; That's just straight up SQL.&amp;nbsp; But if you need variables for some reason:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vEndDate = makedate(2011,1,3);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vStartDate = date(vEndDate-90);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But those are QlikView dates, not SQL dates, or however you store your dates.&amp;nbsp; In our system for example, most dates are stored as an integer in format YYYYMMDD.&amp;nbsp; So I'd want to format my variables that way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vEndDate = date(makedate(2011,1,3),'YYYYMMDD');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vStartDate = date(vEndDate-90,'YYYYMMDD');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Something:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SQL SELECT ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FROM ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHERE MyDate BETWEEN $(vStartDate) AND $(vEndDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that seems like a lot of complication for no reason when I could just write this instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Something:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SQL SELECT ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FROM ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHERE MyDate BETWEEN 20101005 AND 20110103&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 20:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265797#M99912</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-29T20:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inline any date (i.e. '01-03-2011') and subtract 90 days</title>
      <link>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265798#M99913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Let me clarify.&amp;nbsp; Below is my code.&amp;nbsp; If I can convert the hardcoded date into a variable, then I can subtract the 90 days.&amp;nbsp; I guess what I need is how to convert a hardcoded date into a variable date.&amp;nbsp; Thanks so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ZEDY4QV:&lt;BR /&gt;Load&lt;BR /&gt;Year(BUDAT) &amp;amp; '-' &amp;amp; Month(BUDAT) &amp;amp; '-' &amp;amp; trim(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Bakery Desc]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) as %BakeryKey,&lt;BR /&gt;* &lt;BR /&gt;where BUDAT &amp;gt;= '$(vWeekEnd90Date)'&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// Previous 90 Days from any given date&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;AND BUDAT &amp;lt; '2011-01-03'&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;*&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;&lt;SPAN style="color: #ff8000; font-size: 8pt;"&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff8000; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[$(vQVDPath)ZEDY4QV.qvd] (qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 20:37:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265798#M99913</guid>
      <dc:creator />
      <dc:date>2011-11-29T20:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Inline any date (i.e. '01-03-2011') and subtract 90 days</title>
      <link>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265799#M99914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you so much, John.&amp;nbsp; You should be teaching this!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 20:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inline-any-date-i-e-01-03-2011-and-subtract-90-days/m-p/265799#M99914</guid>
      <dc:creator />
      <dc:date>2011-11-29T20:38:52Z</dc:date>
    </item>
  </channel>
</rss>

