<?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 Subtract dates into a column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347388#M128534</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 have two date columns coming from excel file&lt;/P&gt;&lt;P&gt;Starting date and End Date with the format MM/DD/YYYY&lt;/P&gt;&lt;P&gt; I am building a table chart and would like to have a period column&lt;/P&gt;&lt;P&gt;Anybody knows how could I create a a new column to calculate the period between Start and End date and put it in percentage % of completing the period?&lt;/P&gt;&lt;P&gt;In other words, I would like to get the period in days and then get the percentage of completion of the period on today&lt;/P&gt;&lt;P&gt;Thxs,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2012 16:56:46 GMT</pubDate>
    <dc:creator>alec1982</dc:creator>
    <dc:date>2012-06-11T16:56:46Z</dc:date>
    <item>
      <title>Subtract dates into a column</title>
      <link>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347388#M128534</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 have two date columns coming from excel file&lt;/P&gt;&lt;P&gt;Starting date and End Date with the format MM/DD/YYYY&lt;/P&gt;&lt;P&gt; I am building a table chart and would like to have a period column&lt;/P&gt;&lt;P&gt;Anybody knows how could I create a a new column to calculate the period between Start and End date and put it in percentage % of completing the period?&lt;/P&gt;&lt;P&gt;In other words, I would like to get the period in days and then get the percentage of completion of the period on today&lt;/P&gt;&lt;P&gt;Thxs,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 16:56:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347388#M128534</guid>
      <dc:creator>alec1982</dc:creator>
      <dc:date>2012-06-11T16:56:46Z</dc:date>
    </item>
    <item>
      <title>Subtract dates into a column</title>
      <link>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347389#M128535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To get the difference of two dates you only need to use EndDate - StartDate.&lt;/P&gt;&lt;P&gt;So you can calculate both range of days and make the division to get he percentage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don´t get it, please, expose your problem with a complete example.&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, 11 Jun 2012 19:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347389#M128535</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2012-06-11T19:45:48Z</dc:date>
    </item>
    <item>
      <title>Subtract dates into a column</title>
      <link>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347390#M128536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Example: Starting Date 07/09/2010 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/25/2016&lt;/P&gt;&lt;P&gt;I am looking to build a column to show me the period in total days.&lt;/P&gt;&lt;P&gt;and then another colmun to calculate the current date - starting date in total days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 19:56:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347390#M128536</guid>
      <dc:creator>alec1982</dc:creator>
      <dc:date>2012-06-11T19:56:11Z</dc:date>
    </item>
    <item>
      <title>Subtract dates into a column</title>
      <link>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347391#M128537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you tell me if it works for you doing EndDate - StartDate and Today() - StartDate ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take care with Today() function, normally, if you set the date format like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET DateFormat='MM/DD/YYYY'; today function returns that format so you could do the substract without problems but if you want, you could use Date(Today(),'MM/DD/YYYY') to be sure that is returned the same type data.&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, 11 Jun 2012 20:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347391#M128537</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2012-06-11T20:34:22Z</dc:date>
    </item>
    <item>
      <title>Subtract dates into a column</title>
      <link>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347392#M128538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; &lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt;"&gt;Subtracting any 2 dates will give you the number of days between. It is probably safest to use the num() function on the dates to avoid possible &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"&gt;syntax &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt;"&gt;errors. For example:&lt;BR /&gt; num([End Date]) - num([Start Date]) will give you the entire period.&lt;BR /&gt; You will probably want to set a variable with the value of today() as follows in your load script:&lt;BR /&gt; LET v_Today = today();&lt;BR /&gt; Then you can calculate the difference between today and start as follows:&lt;BR /&gt; num(v_Today) - num([Start Date]) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt;"&gt;-Phil&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 22:28:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtract-dates-into-a-column/m-p/347392#M128538</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-11T22:28:30Z</dc:date>
    </item>
  </channel>
</rss>

