<?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: Problem with if statement and time comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880851#M307369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without sample apps it is difficult to provide solution.&lt;/P&gt;&lt;P&gt;but you can debug your own code, by taking each expression in&amp;nbsp; text object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check below in text object&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;=time(ACTION.TIME, 'hh:mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;time(time#('14:30','hh:mm'),'hh:mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it wont work&lt;/P&gt;&lt;P&gt;try with NUM() and frac()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;num(time(ACTION.TIME, 'hh:mm'))&amp;lt;= num(time(time#('14:30','hh:mm'),'hh:mm'))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;do same with frac()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Apr 2015 09:22:40 GMT</pubDate>
    <dc:creator>PrashantSangle</dc:creator>
    <dc:date>2015-04-22T09:22:40Z</dc:date>
    <item>
      <title>Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880840#M307358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as usually i need your help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've this if statement and i need it to create this dimension in a pivot or a listbox:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 12pt;"&gt;if(date(ACTION.TIME, 'hh:mm')&amp;lt;=date('14:30','hh:mm'),'Current Day','Following Days')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the date function recognize the hour and minutes and also the 14:30 for the right part but seems that qlik is not able to confront that.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Alfonso&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 07:30:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880840#M307358</guid>
      <dc:creator />
      <dc:date>2015-04-22T07:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880841#M307359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alfonso,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try using the TIME function for that. I have that in several apps because we work in two shifts, with a changeover at 14:00 - it works for me in all cases. But there should&amp;nbsp; be no need to wrap that '14:30' in any function as it's just a fixed value - your other function (around the ACTION.TIME) should return a value you can compare to that.&lt;/P&gt;&lt;P&gt;Try with the TIME function for a start.&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 07:36:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880841#M307359</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-04-22T07:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880842#M307360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to convert it into number then compare.&lt;/P&gt;&lt;P&gt;or try below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(time(ACTION.TIME, 'hh:mm')&amp;lt;=time(time#('14:30','hh:mm'),'hh:mm'),'Current Day','Following Days')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 07:37:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880842#M307360</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-04-22T07:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880843#M307361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;date('14:30','hh:mm') won't work. The date() function only formats a date. It doesn't create a date from a string value. Try time#('14:30', 'hh:mm').&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 07:38:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880843#M307361</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-04-22T07:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880844#M307362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(date(time(&lt;SPAN style="color: #000080; font-size: 12pt;"&gt;ACTION.TIME&lt;/SPAN&gt;, 'hh:mm'))&amp;lt;=date(time(('14:30'),'hh:mm')),'Current Day','Following Days')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 07:38:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880844#M307362</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2015-04-22T07:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880845#M307363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't works too... can you try it before on similar data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 08:14:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880845#M307363</guid>
      <dc:creator />
      <dc:date>2015-04-22T08:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880846#M307364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Don't works too... can you try it before on similar data?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 08:15:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880846#M307364</guid>
      <dc:creator />
      <dc:date>2015-04-22T08:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880847#M307365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Don't works too... can you try it before on similar data?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 08:16:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880847#M307365</guid>
      <dc:creator />
      <dc:date>2015-04-22T08:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880848#M307366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Don't works too... can you try it before on similar data?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 08:16:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880848#M307366</guid>
      <dc:creator />
      <dc:date>2015-04-22T08:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880849#M307367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post sample app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 08:56:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880849#M307367</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2015-04-22T08:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880850#M307368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately not, but i can say that the problem is with right part... qlik is not able to recognize time#('14:30', 'hh:mm') like a time format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 09:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880850#M307368</guid>
      <dc:creator />
      <dc:date>2015-04-22T09:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with if statement and time comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880851#M307369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without sample apps it is difficult to provide solution.&lt;/P&gt;&lt;P&gt;but you can debug your own code, by taking each expression in&amp;nbsp; text object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check below in text object&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;=time(ACTION.TIME, 'hh:mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;time(time#('14:30','hh:mm'),'hh:mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it wont work&lt;/P&gt;&lt;P&gt;try with NUM() and frac()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;num(time(ACTION.TIME, 'hh:mm'))&amp;lt;= num(time(time#('14:30','hh:mm'),'hh:mm'))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;do same with frac()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 09:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-if-statement-and-time-comparison/m-p/880851#M307369</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-04-22T09:22:40Z</dc:date>
    </item>
  </channel>
</rss>

