<?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 Creating a dayperiod field based on time periods in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Creating-a-dayperiod-field-based-on-time-periods/m-p/1538042#M38831</link>
    <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a new field with three values based on time periods during a day.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the following script in the load script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;If([Begintijd] &amp;gt;=7 and [Eindtijd] &amp;lt;= 18,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dual('Overdag', 1),&lt;BR /&gt;If([Begintijd] &amp;gt;18 and [Eindtijd] &amp;lt; 23,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dual('Avond',2),&lt;BR /&gt;If([Begintijd] &amp;gt;=23 and [Begintijd] &amp;lt;0 and [Eindtijd] &amp;gt;=0 and [Eindtijd] &amp;lt; 7,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dual('Nacht',3))))&lt;/P&gt;&lt;P&gt;AS [Transport Dagperiode]&lt;/P&gt;&lt;P&gt;The field [Begintijd] and [Eindtijd] are formatted as followed: 8AM for example is formatted as 8,00 and 8PM is formatted as 20,00. The full lenght of the values for both fields lies between 0,00 and 23,59&lt;/P&gt;&lt;P&gt;The values 'Overdag' and 'Avond' work correctly but i can't figure out what is wrong with expression of the 'Nacht'&amp;nbsp; value&lt;/P&gt;&lt;P&gt;The result I am trying to get is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;When [begintijd] &amp;gt;= 23,00 (11PM)&amp;nbsp; and &amp;lt;7,00 (7AM) and [Eindtijd]&amp;nbsp;&lt;SPAN&gt;&amp;gt;= 23,00 (11PM)&amp;nbsp; and &amp;lt;7,00 (7AM) = 'Nacht'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there anyone who can help me with this? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many Thanks in advance!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sincerley,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rick&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Jan 2019 17:28:18 GMT</pubDate>
    <dc:creator>Rick_T</dc:creator>
    <dc:date>2019-01-31T17:28:18Z</dc:date>
    <item>
      <title>Creating a dayperiod field based on time periods</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-dayperiod-field-based-on-time-periods/m-p/1538042#M38831</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a new field with three values based on time periods during a day.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the following script in the load script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;If([Begintijd] &amp;gt;=7 and [Eindtijd] &amp;lt;= 18,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dual('Overdag', 1),&lt;BR /&gt;If([Begintijd] &amp;gt;18 and [Eindtijd] &amp;lt; 23,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dual('Avond',2),&lt;BR /&gt;If([Begintijd] &amp;gt;=23 and [Begintijd] &amp;lt;0 and [Eindtijd] &amp;gt;=0 and [Eindtijd] &amp;lt; 7,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dual('Nacht',3))))&lt;/P&gt;&lt;P&gt;AS [Transport Dagperiode]&lt;/P&gt;&lt;P&gt;The field [Begintijd] and [Eindtijd] are formatted as followed: 8AM for example is formatted as 8,00 and 8PM is formatted as 20,00. The full lenght of the values for both fields lies between 0,00 and 23,59&lt;/P&gt;&lt;P&gt;The values 'Overdag' and 'Avond' work correctly but i can't figure out what is wrong with expression of the 'Nacht'&amp;nbsp; value&lt;/P&gt;&lt;P&gt;The result I am trying to get is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;When [begintijd] &amp;gt;= 23,00 (11PM)&amp;nbsp; and &amp;lt;7,00 (7AM) and [Eindtijd]&amp;nbsp;&lt;SPAN&gt;&amp;gt;= 23,00 (11PM)&amp;nbsp; and &amp;lt;7,00 (7AM) = 'Nacht'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there anyone who can help me with this? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many Thanks in advance!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sincerley,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rick&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 17:28:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-dayperiod-field-based-on-time-periods/m-p/1538042#M38831</guid>
      <dc:creator>Rick_T</dc:creator>
      <dc:date>2019-01-31T17:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dayperiod field based on time periods</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-dayperiod-field-based-on-time-periods/m-p/1538054#M38832</link>
      <description>&lt;P&gt;May be try this&lt;/P&gt;&lt;PRE&gt;If(
    ([Begintijd] &amp;gt;= 23 or [Begintijd] &amp;lt; 0) and ([Eindtijd] &amp;gt;= 0 or [Eindtijd] &amp;lt; 7)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 18:05:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-dayperiod-field-based-on-time-periods/m-p/1538054#M38832</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-31T18:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dayperiod field based on time periods</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-dayperiod-field-based-on-time-periods/m-p/1538245#M38856</link>
      <description>&lt;P&gt;Thank you very much!&amp;nbsp;&lt;/P&gt;&lt;P&gt;The or operator works like a charm &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a great day!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 07:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-dayperiod-field-based-on-time-periods/m-p/1538245#M38856</guid>
      <dc:creator>Rick_T</dc:creator>
      <dc:date>2019-02-01T07:29:00Z</dc:date>
    </item>
  </channel>
</rss>

