<?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: Difference between Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663273#M595019</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Please find in the attached files a sample.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance for your help.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jan 2020 13:13:36 GMT</pubDate>
    <dc:creator>Black_Hole</dc:creator>
    <dc:date>2020-01-07T13:13:36Z</dc:date>
    <item>
      <title>Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1662998#M595009</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I try to calculate the difference between two dates with a condition.&lt;/P&gt;&lt;P&gt;If the difference between the date is upper to one year then put the value '&amp;gt;365' else '=&amp;lt;365'.&lt;/P&gt;&lt;P&gt;But the result is no correct.&lt;/P&gt;&lt;P&gt;Below my script and a screenshot of the result:&lt;/P&gt;&lt;P&gt;[DateDiff]:&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt;Item,&lt;BR /&gt;IF(DATE(DATE#(LastTransDate,'YYYY/MM/DD'),'YYYY/MM/DD')-DATE(DATE#(Ancienne_LastTransDate,'YYYY/MM/DD'),'YYYY/MM/DD')&amp;gt;=365,'&amp;gt;=365','&amp;lt;365') AS YearRatio&lt;BR /&gt;RESIDENT CalculationDates;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="datediff.PNG" style="width: 304px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/26401i13A630324D664676/image-size/large?v=v2&amp;amp;px=999" role="button" title="datediff.PNG" alt="datediff.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please could you tell me what is wrong in my script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:35:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1662998#M595009</guid>
      <dc:creator>Black_Hole</dc:creator>
      <dc:date>2024-11-16T01:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663004#M595010</link>
      <description>&lt;P&gt;Use the num of the date to calculate it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so num(LastTransDate) and num(ancienne_LastTransDate)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 16:00:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663004#M595010</guid>
      <dc:creator>bramkn</dc:creator>
      <dc:date>2020-01-06T16:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663005#M595013</link>
      <description>&lt;P&gt;try to use floor&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(floor(DATE#(LastTransDate,'YYYY/MM/DD'))-floor(DATE#(Ancienne_LastTransDate,'YYYY/MM/DD'))&amp;gt;=365,'&amp;gt;=365','&amp;lt;365') AS YearRatio&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 16:00:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663005#M595013</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-06T16:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663006#M595014</link>
      <description>&lt;P&gt;Seems to be ok, but the script has 'AS YearRatio' but the table is 'RatioYear'. Are you using the correct field?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 16:03:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663006#M595014</guid>
      <dc:creator>RogerStone</dc:creator>
      <dc:date>2020-01-06T16:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663007#M595015</link>
      <description>&lt;P&gt;I think you might need to add the 2 date fields to your load script:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[DateDiff]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LOAD DISTINCT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;LastTransDate,&amp;nbsp;Ancienne_LastTransDate,&lt;/STRONG&gt; Item,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IF(DATE(DATE#(LastTransDate,'YYYY/MM/DD'),'YYYY/MM/DD')-DATE(DATE#(Ancienne_LastTransDate,'YYYY/MM/DD'),'YYYY/MM/DD')&amp;gt;=365,'&amp;gt;=365','&amp;lt;365') AS YearRatio&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RESIDENT CalculationDates;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 16:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663007#M595015</guid>
      <dc:creator>prasadmundewadi</dc:creator>
      <dc:date>2020-01-06T16:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663008#M595016</link>
      <description>&lt;P&gt;The calc you have used seems correct&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 16:11:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663008#M595016</guid>
      <dc:creator>prasadmundewadi</dc:creator>
      <dc:date>2020-01-06T16:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663259#M595017</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/10239"&gt;@prasadmundewadi&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I tried both but none give me the correct result. I think that my issue is due to the line below of my script:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;IF(LEN(Ancienne_LastTransDate)&amp;lt;=0,'2019/12/31', Ancienne_LastTransDate) AS LastTransDate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Maybe, the value '2019/12/31' is not considered as a date. That's why, the difference of my conditional IF is not done.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please could you tell me if that can explain why I have in any case the result "&amp;lt;365" and the result is never equal to "&amp;gt;=365".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 12:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663259#M595017</guid>
      <dc:creator>Black_Hole</dc:creator>
      <dc:date>2020-01-07T12:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663265#M595018</link>
      <description>&lt;P&gt;would you be able to share a sample file to look at?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 12:41:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663265#M595018</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-07T12:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663273#M595019</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Please find in the attached files a sample.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 13:13:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663273#M595019</guid>
      <dc:creator>Black_Hole</dc:creator>
      <dc:date>2020-01-07T13:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663286#M595021</link>
      <description>&lt;P&gt;Based on sample, I can see that both Dates you are subtracting is actually the same date. This could be the reason you are not getting correct results.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 13:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1663286#M595021</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-07T13:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1667918#M595022</link>
      <description>&lt;P&gt;Did Kush's last post help you get things sorted?&amp;nbsp; If so, be sure to circle back to your thread and use the Accept as Solution button on that post to give him credit for the help and to let other Community Members know that worked.&amp;nbsp; If you did something else, consider posting that, and then mark it, so everyone knows what the issue was and what you did to fix it.&amp;nbsp; If you still need further help, leave an update post.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 22:07:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-Dates/m-p/1667918#M595022</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-01-21T22:07:07Z</dc:date>
    </item>
  </channel>
</rss>

