<?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 Date Time Diff / If statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Time-Diff-If-statement/m-p/470118#M175579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Please can you help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a formula that will calculate the date/ time diiference between two times and depending on this number in minutes, I want it to display whether it is a late start by how many minutes, early start by how many minutes or started on time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= (if (interval( session_actual_start - scheduled_start, 'mm') &amp;gt;-10, 'Started&amp;nbsp; ' &amp;amp;&amp;nbsp; interval (session_actual_start-scheduled_start, 'mm') &amp;amp; '&amp;nbsp; mins early', &lt;/P&gt;&lt;P&gt;if(session_start_difference &amp;gt;=-10 and session_start_difference &amp;lt;=10, 'Started On Time',&lt;/P&gt;&lt;P&gt;if (interval(session_actual_start - scheduled_start, 'mm') &amp;gt;10, 'Started&amp;nbsp; ' &amp;amp;&amp;nbsp; interval (session_actual_start-scheduled_finish, 'mm') &amp;amp; '&amp;nbsp;&amp;nbsp; mins late'))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the formula, which is working for Early starts but not picking up late starts, it still showing early start even though it is late.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when it shows an early start it says: Started -50 mins early, how do I get rid of the - infont of the number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense and someone can help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Jun 2013 12:49:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-06-13T12:49:08Z</dc:date>
    <item>
      <title>Date Time Diff / If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Time-Diff-If-statement/m-p/470118#M175579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Please can you help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a formula that will calculate the date/ time diiference between two times and depending on this number in minutes, I want it to display whether it is a late start by how many minutes, early start by how many minutes or started on time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= (if (interval( session_actual_start - scheduled_start, 'mm') &amp;gt;-10, 'Started&amp;nbsp; ' &amp;amp;&amp;nbsp; interval (session_actual_start-scheduled_start, 'mm') &amp;amp; '&amp;nbsp; mins early', &lt;/P&gt;&lt;P&gt;if(session_start_difference &amp;gt;=-10 and session_start_difference &amp;lt;=10, 'Started On Time',&lt;/P&gt;&lt;P&gt;if (interval(session_actual_start - scheduled_start, 'mm') &amp;gt;10, 'Started&amp;nbsp; ' &amp;amp;&amp;nbsp; interval (session_actual_start-scheduled_finish, 'mm') &amp;amp; '&amp;nbsp;&amp;nbsp; mins late'))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the formula, which is working for Early starts but not picking up late starts, it still showing early start even though it is late.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when it shows an early start it says: Started -50 mins early, how do I get rid of the - infont of the number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense and someone can help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 12:49:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Time-Diff-If-statement/m-p/470118#M175579</guid>
      <dc:creator />
      <dc:date>2013-06-13T12:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Diff / If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Time-Diff-If-statement/m-p/470119#M175580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the fabs() function so that negative numbers are made positive: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;if (interval( session_actual_start - scheduled_start, 'mm') &amp;lt;-10, 'Started&amp;nbsp; ' &amp;amp;&amp;nbsp; interval (&lt;STRONG&gt;fabs(session_actual_start-scheduled_start)&lt;/STRONG&gt;, 'mm') &amp;amp; '&amp;nbsp; mins early',...etc&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 12:58:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Time-Diff-If-statement/m-p/470119#M175580</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-06-13T12:58:00Z</dc:date>
    </item>
  </channel>
</rss>

