<?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 How do I determine how many days have past since a change? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271170#M399863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a relational model that is all based on ITMSNumber. What I'm trying to do is something like the following. (Please excuse the pseudo code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a field called ChangeDate and another field called ChangeNewValue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left keep&lt;/P&gt;&lt;P&gt;Table6:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ITMSNumber&lt;/P&gt;&lt;P&gt;IF(ChangeNewValue='Quarantined- DSC',&lt;/P&gt;&lt;P&gt;THEN DaysPassed = Today() - ChangeDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT ITMSNumber,&lt;/P&gt;&lt;P&gt;ChangeNewValue,&lt;/P&gt;&lt;P&gt;ChangeDate&lt;/P&gt;&lt;P&gt;FROM MPL.dbo."tblCHANGE";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date field (ChangeDate) is formatted like so- 2016-12-12 10:50:38.377&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want it to say that it's been 1, 5, 15, etc. days passed since the ITMSNumber has changed to 'Quarantined- DSC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should say that I want a table that has a bunch of values in it for all of the ITMSNumber's that have changed to Quarantined- DSC. Like so-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITMSNumber | DaysPassed&lt;/P&gt;&lt;P&gt;12374&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; 2&lt;/P&gt;&lt;P&gt;12407&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; 10&lt;/P&gt;&lt;P&gt;18472&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; 8&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2017 13:57:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-01-18T13:57:09Z</dc:date>
    <item>
      <title>How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271170#M399863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a relational model that is all based on ITMSNumber. What I'm trying to do is something like the following. (Please excuse the pseudo code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a field called ChangeDate and another field called ChangeNewValue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left keep&lt;/P&gt;&lt;P&gt;Table6:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ITMSNumber&lt;/P&gt;&lt;P&gt;IF(ChangeNewValue='Quarantined- DSC',&lt;/P&gt;&lt;P&gt;THEN DaysPassed = Today() - ChangeDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT ITMSNumber,&lt;/P&gt;&lt;P&gt;ChangeNewValue,&lt;/P&gt;&lt;P&gt;ChangeDate&lt;/P&gt;&lt;P&gt;FROM MPL.dbo."tblCHANGE";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date field (ChangeDate) is formatted like so- 2016-12-12 10:50:38.377&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want it to say that it's been 1, 5, 15, etc. days passed since the ITMSNumber has changed to 'Quarantined- DSC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should say that I want a table that has a bunch of values in it for all of the ITMSNumber's that have changed to Quarantined- DSC. Like so-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITMSNumber | DaysPassed&lt;/P&gt;&lt;P&gt;12374&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; 2&lt;/P&gt;&lt;P&gt;12407&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; 10&lt;/P&gt;&lt;P&gt;18472&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; 8&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 13:57:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271170#M399863</guid>
      <dc:creator />
      <dc:date>2017-01-18T13:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271171#M399864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Left keep&lt;/P&gt;&lt;P&gt;Table6:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ITMSNumber&lt;/P&gt;&lt;P&gt;IF(ChangeNewValue='Quarantined- DSC', Floor(Today() - Date#(ChangeDate, 'YYYY-MM-DD&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; hh:mm:ss.fff&lt;/SPAN&gt;'))) as DaysPassed&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT ITMSNumber,&lt;/P&gt;&lt;P&gt;ChangeNewValue,&lt;/P&gt;&lt;P&gt;ChangeDate&lt;/P&gt;&lt;P&gt;FROM MPL.dbo."tblCHANGE";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:04:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271171#M399864</guid>
      <dc:creator>Aurelien_Martinez</dc:creator>
      <dc:date>2017-01-18T14:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271172#M399865</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;Replace &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IF(ChangeNewValue='Quarantined- DSC',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;THEN DaysPassed = Today() - ChangeDate)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;with &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IF(ChangeNewValue='Quarantined- DSC', date(Today()) -floor(date(TIMESTAMP# (ChangeDate,'YYYY-MM-DD hh:mm:ss.fff') as &lt;SPAN&gt;DaysPassed &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Best regards,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Cosmina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:11:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271172#M399865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-18T14:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271173#M399866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's supposed to be 4 closing parenthesis there just to note.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It didn't work. It didn't provide any values at all for DaysPassed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:23:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271173#M399866</guid>
      <dc:creator />
      <dc:date>2017-01-18T14:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271174#M399867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked and seemed like it would be the right answer, but when I cross checked it with the database this is what I got.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Today is 2017-01-18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date of the change was- 2017-01-03 09:28:44.763&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference is 15 days, however, the DaysPassed says that it's only been 9 days since the change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script works but it's not giving the right results...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:26:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271174#M399867</guid>
      <dc:creator />
      <dc:date>2017-01-18T14:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271175#M399868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IF(ChangeNewValue='Quarantined- DSC', Floor(Today() - Date#(ChangeDate, 'YYYY-MM-DD&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; hh:mm:ss.fff&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;')))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:29:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271175#M399868</guid>
      <dc:creator>Aurelien_Martinez</dc:creator>
      <dc:date>2017-01-18T14:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271176#M399869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed it to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(ChangeNewValue='Quarantined - DSC', date(Today()) - Floor(date(TIMESTAMP(ChangeDate, 'YYYY-MM-DD hh.mm.ss.fff')))) as DaysPassed;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it's giving me more accurate numbers, but they're still not correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:33:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271176#M399869</guid>
      <dc:creator />
      <dc:date>2017-01-18T14:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271177#M399870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I do that, I have the good result :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date(Today()) - Floor(date(TIMESTAMP('2017-01-03 09:28:44.763', 'YYYY-MM-DD hh.mm.ss.fff')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ceil(Today() - Date#('2017-01-03 09:28:44.763', 'YYYY-MM-DD hh:mm:ss.fff'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:40:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271177#M399870</guid>
      <dc:creator>Aurelien_Martinez</dc:creator>
      <dc:date>2017-01-18T14:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271178#M399871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you getting 15? Mine is saying 10. It's been 15 days since 2017-01-03&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:53:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271178#M399871</guid>
      <dc:creator />
      <dc:date>2017-01-18T14:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271179#M399872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/149909_Capture.PNG" style="height: 175px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:55:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271179#M399872</guid>
      <dc:creator>Aurelien_Martinez</dc:creator>
      <dc:date>2017-01-18T14:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I determine how many days have past since a change?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271180#M399873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for showing that picture. I just had to close and reopen Qlik for it to work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 15:14:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-determine-how-many-days-have-past-since-a-change/m-p/1271180#M399873</guid>
      <dc:creator />
      <dc:date>2017-01-18T15:14:41Z</dc:date>
    </item>
  </channel>
</rss>

