<?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: If statement/flag on a time field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/If-statement-flag-on-a-time-field/m-p/1903792#M74553</link>
    <description>&lt;P&gt;The issue might be that Time() as a formatting function doesn't change the numerical part of a timestamp.&lt;/P&gt;
&lt;P&gt;So one solution could be to extract the (fractional) time part from your timestamp using the frac() function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;If(Frac([Call Start Time (CommsCall)])&amp;gt;='09:00:00' and Frac([Call Start Time (CommsCall)])&amp;lt;='17:30:00',0,1) as [Outside Working Hours]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 21:22:10 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2022-03-10T21:22:10Z</dc:date>
    <item>
      <title>If statement/flag on a time field</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-flag-on-a-time-field/m-p/1903773#M74552</link>
      <description>&lt;P&gt;Hey guys, i have a date time field formated dd/mm/yyyy hh:mm:ss.&lt;BR /&gt;&lt;BR /&gt;I'm trying to create a flag in the data load for inbetween our working hours, which is 09:00:00 to 17:30:00.&lt;/P&gt;
&lt;P&gt;I feel i must be missing something really simple but i cannot for the life of me get it to work....&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is what i have tired...&lt;BR /&gt;&lt;BR /&gt;If(Time("Call Start Time (CommsCall)")&amp;gt;'09:00:00'&lt;BR /&gt;and Time("Call Start Time (CommsCall)")&amp;lt;='17:30:00',1,0) as [Outside Working Hours], //Doesnt work&lt;BR /&gt;&lt;BR /&gt;If(Time("Call Start Time (CommsCall)"&amp;gt;'09:00:00'&lt;BR /&gt;and Time("Call Start Time (CommsCall)"&amp;lt;='17:30:00')),1,0) as [Outside Working Hours1], //Doesnt work&lt;BR /&gt;&lt;BR /&gt;if(time("Call Start Time (CommsCall)")&amp;gt;'09,00,00',1,0) as [Greater Than 9], //Works&lt;BR /&gt;&lt;BR /&gt;if(time("Call Start Time (CommsCall)")&amp;gt;='17,30,00',1,0) as [17:30 And Above],//Doesnt work, the flag starts at 17:00:00&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 20:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-flag-on-a-time-field/m-p/1903773#M74552</guid>
      <dc:creator>Zara</dc:creator>
      <dc:date>2022-03-10T20:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: If statement/flag on a time field</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-flag-on-a-time-field/m-p/1903792#M74553</link>
      <description>&lt;P&gt;The issue might be that Time() as a formatting function doesn't change the numerical part of a timestamp.&lt;/P&gt;
&lt;P&gt;So one solution could be to extract the (fractional) time part from your timestamp using the frac() function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;If(Frac([Call Start Time (CommsCall)])&amp;gt;='09:00:00' and Frac([Call Start Time (CommsCall)])&amp;lt;='17:30:00',0,1) as [Outside Working Hours]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 21:22:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-flag-on-a-time-field/m-p/1903792#M74553</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-03-10T21:22:10Z</dc:date>
    </item>
  </channel>
</rss>

