<?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 Make Time Function With IF Statement Issue in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Make-Time-Function-With-IF-Statement-Issue/m-p/1819276#M67163</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I creating the Sequence number for DateTime as hour to hour in 24 hour format. If time is between 05:01 - 06:00 then Sequence number should be as 1 as so on. Below is the script using:&lt;/P&gt;&lt;P&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(05) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(06),'1',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(06) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(07),'2',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(07) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(08),'3',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(08) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(09),'4',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(09) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(10),'5',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(10) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(11),'6',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(11) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(12),'7',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(12) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(13),'8',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(13) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(14),'9',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(14) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(15),'10',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(15) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(15,30),'11',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(15,30) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(16),'12',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(16) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(17),'13',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(17) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(18),'14',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(18) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(19),'15',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(19) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(20),'16',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(20) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(21),'17',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(21) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(22),'18',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(22) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(23),'19',&lt;BR /&gt;&lt;STRONG&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(23) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(00),'20',&lt;/STRONG&gt;&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(00) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(01),'21',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(01) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(02),'22',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(02) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(02,30),'23',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(02,30) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(03),'24', '25')))))))))))))))))))))))) as Sequence&lt;/P&gt;&lt;P&gt;I am not getting sequence number is 20. Below is the screenshot for you ref. I have a data time between 23 to 00 hours.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dineshm030_0-1625210173746.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57862iEC206A55D5AD9A18/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dineshm030_0-1625210173746.png" alt="dineshm030_0-1625210173746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank in advance.&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17935"&gt;@MayilVahanan&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp; Kindly help me out.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dinesh.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2021 18:17:33 GMT</pubDate>
    <dc:creator>dineshm030</dc:creator>
    <dc:date>2021-11-30T18:17:33Z</dc:date>
    <item>
      <title>Make Time Function With IF Statement Issue</title>
      <link>https://community.qlik.com/t5/App-Development/Make-Time-Function-With-IF-Statement-Issue/m-p/1819276#M67163</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I creating the Sequence number for DateTime as hour to hour in 24 hour format. If time is between 05:01 - 06:00 then Sequence number should be as 1 as so on. Below is the script using:&lt;/P&gt;&lt;P&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(05) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(06),'1',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(06) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(07),'2',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(07) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(08),'3',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(08) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(09),'4',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(09) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(10),'5',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(10) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(11),'6',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(11) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(12),'7',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(12) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(13),'8',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(13) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(14),'9',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(14) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(15),'10',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(15) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(15,30),'11',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(15,30) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(16),'12',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(16) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(17),'13',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(17) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(18),'14',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(18) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(19),'15',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(19) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(20),'16',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(20) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(21),'17',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(21) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(22),'18',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(22) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(23),'19',&lt;BR /&gt;&lt;STRONG&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(23) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(00),'20',&lt;/STRONG&gt;&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(00) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(01),'21',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(01) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(02),'22',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(02) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(02,30),'23',&lt;BR /&gt;If(Time(Frac(DateTimeUTC),'hh') &amp;gt; maketime(02,30) and Time(Frac(DateTimeUTC),'hh') &amp;lt;= maketime(03),'24', '25')))))))))))))))))))))))) as Sequence&lt;/P&gt;&lt;P&gt;I am not getting sequence number is 20. Below is the screenshot for you ref. I have a data time between 23 to 00 hours.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dineshm030_0-1625210173746.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57862iEC206A55D5AD9A18/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dineshm030_0-1625210173746.png" alt="dineshm030_0-1625210173746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank in advance.&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17935"&gt;@MayilVahanan&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp; Kindly help me out.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dinesh.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 18:17:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Make-Time-Function-With-IF-Statement-Issue/m-p/1819276#M67163</guid>
      <dc:creator>dineshm030</dc:creator>
      <dc:date>2021-11-30T18:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Make Time Function With IF Statement Issue</title>
      <link>https://community.qlik.com/t5/App-Development/Make-Time-Function-With-IF-Statement-Issue/m-p/1819520#M67187</link>
      <description>&lt;P&gt;Hi, you can try with &amp;lt;=24, because there is no number higher than 23 and lower than 0, or just keep the &amp;gt;23 comparison and remove the &amp;lt;= comparison&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 08:16:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Make-Time-Function-With-IF-Statement-Issue/m-p/1819520#M67187</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-07-03T08:16:05Z</dc:date>
    </item>
  </channel>
</rss>

