<?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: date comparisons in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/date-comparisons/m-p/435772#M162549</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usualy the problem with dates in set analysis is with formatting.&amp;nbsp; Most likely the DEATH_DATE is in date format, and [surgery_1_date]+7 is certainly a number, even if [surgery_1_date] is a date.&lt;BR /&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;DEATH_DATE = {"&amp;lt;$(=&lt;STRONG&gt;date(&lt;/STRONG&gt;[surgery_1_date]+7&lt;STRONG&gt;)&lt;/STRONG&gt;"}&amp;gt;} PAT_ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 May 2013 20:31:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-05-07T20:31:30Z</dc:date>
    <item>
      <title>date comparisons</title>
      <link>https://community.qlik.com/t5/QlikView/date-comparisons/m-p/435771#M162548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Hi,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;I'm having trouble comparing dates using set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;I need to count the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;1) Number of&amp;nbsp; patients where [Death_Date] is 7 days or less after [surgery_1_date]&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;2) Number of patients where&amp;nbsp; [Death_Date] is between 8 days post [surgery_1_date] and [surgery_2_date]&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;3) Number of patients where&amp;nbsp; [Death_Date] is after [discharge date] but before [surgery_2_date] ONLY WHERE [admit_type] ='1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;the best i have is:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=count({$&amp;lt;DEATH_DATE = {"&amp;lt;$(=[surgery_1_date]+7"}&amp;gt;} PAT_ID) &lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;and it doesn't work!&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;i can't figure out how to intergrate the more elaborate conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;please help!&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 16:17:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-comparisons/m-p/435771#M162548</guid>
      <dc:creator />
      <dc:date>2013-05-07T16:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: date comparisons</title>
      <link>https://community.qlik.com/t5/QlikView/date-comparisons/m-p/435772#M162549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usualy the problem with dates in set analysis is with formatting.&amp;nbsp; Most likely the DEATH_DATE is in date format, and [surgery_1_date]+7 is certainly a number, even if [surgery_1_date] is a date.&lt;BR /&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;DEATH_DATE = {"&amp;lt;$(=&lt;STRONG&gt;date(&lt;/STRONG&gt;[surgery_1_date]+7&lt;STRONG&gt;)&lt;/STRONG&gt;"}&amp;gt;} PAT_ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 20:31:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-comparisons/m-p/435772#M162549</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-07T20:31:30Z</dc:date>
    </item>
  </channel>
</rss>

