<?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: How to select a date range with a macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-select-a-date-range-with-a-macro/m-p/249500#M94819</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;Instead of Macro you can use the required the date selection in expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find a sample attachment for the same.&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;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Jul 2011 04:39:37 GMT</pubDate>
    <dc:creator>deepakk</dc:creator>
    <dc:date>2011-07-02T04:39:37Z</dc:date>
    <item>
      <title>How to select a date range with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-a-date-range-with-a-macro/m-p/249499#M94818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a macro, which selects two variables and attempts to select a date range in a field, but it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sub DataBetweenSelectedDate()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set FD = ActiveDocument.Variables("FromDate") '' variable for Initial from date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FrmDtt=(FD.GetContent.String)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set TD = ActiveDocument.Variables("ToDate") '' variable for Initial to date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ToDtt=(TD.GetContent.String)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FrmDate="&amp;gt;=" &amp;amp; Day(FrmDtt) &amp;amp; "/" &amp;amp; month(FrmDtt) &amp;amp; "/" &amp;amp; year(FrmDtt)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;msgbox FrmDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ToDate ="&amp;lt;=" &amp;amp; Day(ToDtt) &amp;amp; "/" &amp;amp; month(ToDtt) &amp;amp; "/" &amp;amp; year(ToDtt)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;msgbox ToDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;toSelect = FrmDate&amp;nbsp;&amp;nbsp; &amp;amp;&amp;nbsp;&amp;nbsp; ToDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;msgbox toSelect&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ActiveDocument.Fields("Start_Date").Select toSelect ''&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end sub&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The message boxes in order state: '&amp;gt;=1/12/2010', '&amp;lt;=31/12/2010', '&amp;gt;=1/12/2010&amp;lt;=31/12/2010'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know why this does not select anything in the Start_Date field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2011 18:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-a-date-range-with-a-macro/m-p/249499#M94818</guid>
      <dc:creator />
      <dc:date>2011-07-01T18:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to select a date range with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-a-date-range-with-a-macro/m-p/249500#M94819</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;Instead of Macro you can use the required the date selection in expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find a sample attachment for the same.&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;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2011 04:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-a-date-range-with-a-macro/m-p/249500#M94819</guid>
      <dc:creator>deepakk</dc:creator>
      <dc:date>2011-07-02T04:39:37Z</dc:date>
    </item>
  </channel>
</rss>

