<?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 if statement (Date=Date) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/if-statement-Date-Date/m-p/25197#M1702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two date fields: ACTIVITY_START and ACTIVITY_END with the fomat DD-MM-YYYY HH-MM-SS XY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make an if statement in the load script/data manager that calculates if the start and end activity happen at the same date. I have tried the formula:&lt;/P&gt;&lt;P&gt;- &lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri',sans-serif;"&gt;if (date (ACTIVITY_START) = date(ACTIVITY_END),0,1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This did not work because the result was only 0 if both date fields were exactly the same, so the time had to be the same as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this did not work I made two new date fields with the following formula:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;date(ACTIVITY_START,'DD-MM-YYYY') AS START_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;date(ACTIVITY_END,'DD-MM-YYYY')&amp;nbsp; AS END_DATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i tried the following formula:&lt;/P&gt;&lt;P&gt;if (START_DATE = END_DATE,0,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This same problem occurred, that the times had to be the same as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone a solution for me? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2018 14:51:46 GMT</pubDate>
    <dc:creator>pascaldijkshoor</dc:creator>
    <dc:date>2018-03-28T14:51:46Z</dc:date>
    <item>
      <title>if statement (Date=Date)</title>
      <link>https://community.qlik.com/t5/App-Development/if-statement-Date-Date/m-p/25197#M1702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two date fields: ACTIVITY_START and ACTIVITY_END with the fomat DD-MM-YYYY HH-MM-SS XY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make an if statement in the load script/data manager that calculates if the start and end activity happen at the same date. I have tried the formula:&lt;/P&gt;&lt;P&gt;- &lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri',sans-serif;"&gt;if (date (ACTIVITY_START) = date(ACTIVITY_END),0,1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This did not work because the result was only 0 if both date fields were exactly the same, so the time had to be the same as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this did not work I made two new date fields with the following formula:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;date(ACTIVITY_START,'DD-MM-YYYY') AS START_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;date(ACTIVITY_END,'DD-MM-YYYY')&amp;nbsp; AS END_DATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i tried the following formula:&lt;/P&gt;&lt;P&gt;if (START_DATE = END_DATE,0,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This same problem occurred, that the times had to be the same as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone a solution for me? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2018 14:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-statement-Date-Date/m-p/25197#M1702</guid>
      <dc:creator>pascaldijkshoor</dc:creator>
      <dc:date>2018-03-28T14:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: if statement (Date=Date)</title>
      <link>https://community.qlik.com/t5/App-Development/if-statement-Date-Date/m-p/25198#M1703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you floor(Date) the timestamp will be removed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2018 14:55:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-statement-Date-Date/m-p/25198#M1703</guid>
      <dc:creator>bramkn</dc:creator>
      <dc:date>2018-03-28T14:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: if statement (Date=Date)</title>
      <link>https://community.qlik.com/t5/App-Development/if-statement-Date-Date/m-p/25199#M1704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then i got the numerical value of the datefield right? So this means the date and time have to be exactly the same as well. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2018 15:05:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-statement-Date-Date/m-p/25199#M1704</guid>
      <dc:creator>pascaldijkshoor</dc:creator>
      <dc:date>2018-03-28T15:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: if statement (Date=Date)</title>
      <link>https://community.qlik.com/t5/App-Development/if-statement-Date-Date/m-p/25200#M1705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the integer part (Floor()) is the date and the value to the right of the decimal is time, so Flooring the values will compare the dates.&lt;/P&gt;&lt;P&gt;Be sure that the date format set matches the dates you are loading or Qlik may not recognize them as dates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2018 18:34:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-statement-Date-Date/m-p/25200#M1705</guid>
      <dc:creator>dwforest</dc:creator>
      <dc:date>2018-03-28T18:34:03Z</dc:date>
    </item>
  </channel>
</rss>

