<?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 Day start function on time and date field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Day-start-function-on-time-and-date-field/m-p/1070566#M357613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below formula to calculate my LoadingDuration. The problem is its not retaining the correct calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load* , &lt;/P&gt;&lt;P&gt; Interval(if(len([First Pick Departure Date])&amp;gt;=4 and Hour([First Pick Departure Date])&amp;gt;=3 or Hour([First Pick Departure Date])&amp;lt;8,DayStart([First Pick Departure Date],1,1/3 ),[First Pick Departure Date])-if(len([First Pick Arrival Date])&amp;gt;=4 and Hour([First Pick Arrival Date])&amp;gt;=3 or Hour([First Pick Arrival Date])&amp;lt;8 ,DayStart([First Pick Arrival Date],1,1/3),[First Pick Arrival Date])) as &lt;STRONG&gt;LoadingDuration&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;Load Timestamp#([First Pick Departure Date], 'DD/MM/YYYY hh:mm') as [First Pick Departure Date],&lt;/P&gt;&lt;P&gt;Timestamp#([First Pick Plan Date Start], 'DD/MM/YYYY hh:mm') as [First Pick Plan Date Start],&lt;/P&gt;&lt;P&gt;Timestamp#([First Pick Plan Date End], 'DD/MM/YYYY hh:mm') as [First Pick Plan Date End],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Lean ID], &lt;/P&gt;&lt;P&gt;Timestamp#([First Pick Arrival Date], 'DD/MM/YYYY hh:mm') as [First Pick Arrival Date]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(vDataPath)\DASHBOARD REPORT- Randfontein.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following incorrect values are being retained:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 394px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="142"&gt;First Pick Arrival Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="136"&gt;First Pick Departure Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="116"&gt;LoadingDuration&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;01/12/2015 09:57&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;01/12/2015 14:45&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;01/12/2015 21:38&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;02/12/2015 02:05&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;02/12/2015 03:51&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;02/12/2015 07:41&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;02/12/2015 07:30&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;02/12/2015 10:20&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;24:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;02/12/2015 07:30&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;02/12/2015 10:30&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;24:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;What might be the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moses&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jan 2016 11:44:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-01-12T11:44:50Z</dc:date>
    <item>
      <title>Day start function on time and date field</title>
      <link>https://community.qlik.com/t5/QlikView/Day-start-function-on-time-and-date-field/m-p/1070566#M357613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below formula to calculate my LoadingDuration. The problem is its not retaining the correct calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load* , &lt;/P&gt;&lt;P&gt; Interval(if(len([First Pick Departure Date])&amp;gt;=4 and Hour([First Pick Departure Date])&amp;gt;=3 or Hour([First Pick Departure Date])&amp;lt;8,DayStart([First Pick Departure Date],1,1/3 ),[First Pick Departure Date])-if(len([First Pick Arrival Date])&amp;gt;=4 and Hour([First Pick Arrival Date])&amp;gt;=3 or Hour([First Pick Arrival Date])&amp;lt;8 ,DayStart([First Pick Arrival Date],1,1/3),[First Pick Arrival Date])) as &lt;STRONG&gt;LoadingDuration&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;Load Timestamp#([First Pick Departure Date], 'DD/MM/YYYY hh:mm') as [First Pick Departure Date],&lt;/P&gt;&lt;P&gt;Timestamp#([First Pick Plan Date Start], 'DD/MM/YYYY hh:mm') as [First Pick Plan Date Start],&lt;/P&gt;&lt;P&gt;Timestamp#([First Pick Plan Date End], 'DD/MM/YYYY hh:mm') as [First Pick Plan Date End],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Lean ID], &lt;/P&gt;&lt;P&gt;Timestamp#([First Pick Arrival Date], 'DD/MM/YYYY hh:mm') as [First Pick Arrival Date]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(vDataPath)\DASHBOARD REPORT- Randfontein.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following incorrect values are being retained:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 394px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="142"&gt;First Pick Arrival Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="136"&gt;First Pick Departure Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="116"&gt;LoadingDuration&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;01/12/2015 09:57&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;01/12/2015 14:45&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;01/12/2015 21:38&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;02/12/2015 02:05&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;02/12/2015 03:51&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;02/12/2015 07:41&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;0:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;02/12/2015 07:30&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;02/12/2015 10:20&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;24:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;02/12/2015 07:30&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;02/12/2015 10:30&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;24:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;What might be the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moses&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 11:44:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Day-start-function-on-time-and-date-field/m-p/1070566#M357613</guid>
      <dc:creator />
      <dc:date>2016-01-12T11:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Day start function on time and date field</title>
      <link>https://community.qlik.com/t5/QlikView/Day-start-function-on-time-and-date-field/m-p/1070567#M357614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your conditions couldn't be correct. I see no reason for a len-check and the Hour-checks should be done per AND or both parts needs to be wrapped in brackets. Here an suggestion how it looked more reasonable (Hours-check is replaced with match() which is shorter in this case):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;Interval(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(match(Hour([First Pick Departure Date]), 3,4,5,6,7),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DayStart([First Pick Departure Date],1,1/3 ),[First Pick Departure Date]) -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(match(Hour([First Pick Arrival Date]), 3,4,5,6,7),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DayStart([First Pick Arrival Date],1,1/3),[First Pick Arrival Date])) as LoadingDuration;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 13:23:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Day-start-function-on-time-and-date-field/m-p/1070567#M357614</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-01-12T13:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Day start function on time and date field</title>
      <link>https://community.qlik.com/t5/QlikView/Day-start-function-on-time-and-date-field/m-p/1070568#M357615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would be helpful if you could describe your requirement for LoadingDuration calculation (AKA so we get to know why the calculated LoadingDuration values are 'incorrect').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The if-condition in your LOAD script will always return TRUE, so always the THEN branches (Daystart() functions) will be executed.&lt;/P&gt;&lt;P&gt;This seems incorrect to me (why do we need an if-statement then?), but without knowing your requirements, I can't tell what to change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Daystart()-functions seem to work for me, but again, without knowing what you are trying to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;First Pick Arrival Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;DaystartFPAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;First Pick Departure Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;DaystartFPDD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;LoadingDuration&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;01/12/2015 09:57&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;01/12/2015 14:45&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;0&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;01/12/2015 21:38&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02/12/2015 02:05&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;0&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02/12/2015 03:51&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02/12/2015 07:41&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;0&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02/12/2015 07:30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02/12/2015 10:20&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;03.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02/12/2015 07:30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02/12/2015 10:30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;03.12.2015 08:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 13:24:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Day-start-function-on-time-and-date-field/m-p/1070568#M357615</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-12T13:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Day start function on time and date field</title>
      <link>https://community.qlik.com/t5/QlikView/Day-start-function-on-time-and-date-field/m-p/1070569#M357616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcus, it worked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 13:55:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Day-start-function-on-time-and-date-field/m-p/1070569#M357616</guid>
      <dc:creator />
      <dc:date>2016-01-12T13:55:31Z</dc:date>
    </item>
  </channel>
</rss>

