<?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: Scripting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Scripting/m-p/1216336#M625041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14799080219487691" jivemacro_uid="_14799080219487691"&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;P&gt;Load *, DifferenceInTime * 24 as Difference;&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Interval(TimeStamp#([end date],'YYYY-MM-DD hh:mm:ss:ff') - TimeStamp#([start date],'YYYY-MM-DD hh:mm:ss:ff')) as DifferenceInTime,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TimeStamp#([start date],'YYYY-MM-DD hh:mm:ss:ff') as [start date],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TimeStamp#([end date],'YYYY-MM-DD hh:mm:ss:ff') as [end date]&lt;/P&gt;
&lt;P&gt;Inline&lt;/P&gt;
&lt;P&gt;[&lt;/P&gt;
&lt;P&gt;&amp;nbsp; start date,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end date&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2016-10-23 00:00:00:00, 2016-10-24 23:58:59:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2016-11-24 00:00:00:00, 2017-01-10 23:59:59:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2016-12-01 00:00:00;00, 2016-12-31 23:58:59:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2016-12-28 00:00:00:00, 2017-05-1 00:00:00:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2017-01-01 00:00:00:00, 2017-08-08 23:58:58:00&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Nov 2016 13:33:43 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2016-11-23T13:33:43Z</dc:date>
    <item>
      <title>Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting/m-p/1216335#M625040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have date&amp;nbsp; fields&amp;nbsp; like start date and end date in my table&lt;/P&gt;&lt;P&gt;start date&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; end date&lt;/P&gt;&lt;P&gt;2016-10-23 00:00:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016-10-24 23:58:59:00&lt;/P&gt;&lt;P&gt;2016-11-24 00:00:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2017-01-10 23:59:59:00&lt;/P&gt;&lt;P&gt;2016-12-01 00:00:00;00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016-12-31 23:58:59:00&lt;/P&gt;&lt;P&gt;2016-12-28 00:00:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2017-05-1 00:00:00:00&lt;/P&gt;&lt;P&gt;2017-01-01 00:00:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2017-08-08 23:58:58:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want the&amp;nbsp; total hours between these date range and i want to this in the script level&lt;/P&gt;&lt;P&gt;for Example :&amp;nbsp; start date:2016-10-23 00:00:00:00 and end date: 2016-10-24 23:58:59:00&amp;nbsp; i want as total hours spent was 48 hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one help me on this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:25:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting/m-p/1216335#M625040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-23T13:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting/m-p/1216336#M625041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14799080219487691" jivemacro_uid="_14799080219487691"&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;P&gt;Load *, DifferenceInTime * 24 as Difference;&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Interval(TimeStamp#([end date],'YYYY-MM-DD hh:mm:ss:ff') - TimeStamp#([start date],'YYYY-MM-DD hh:mm:ss:ff')) as DifferenceInTime,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TimeStamp#([start date],'YYYY-MM-DD hh:mm:ss:ff') as [start date],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TimeStamp#([end date],'YYYY-MM-DD hh:mm:ss:ff') as [end date]&lt;/P&gt;
&lt;P&gt;Inline&lt;/P&gt;
&lt;P&gt;[&lt;/P&gt;
&lt;P&gt;&amp;nbsp; start date,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end date&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2016-10-23 00:00:00:00, 2016-10-24 23:58:59:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2016-11-24 00:00:00:00, 2017-01-10 23:59:59:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2016-12-01 00:00:00;00, 2016-12-31 23:58:59:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2016-12-28 00:00:00:00, 2017-05-1 00:00:00:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2017-01-01 00:00:00:00, 2017-08-08 23:58:58:00&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:33:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting/m-p/1216336#M625041</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-11-23T13:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting/m-p/1216337#M625042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for fast response .&amp;nbsp; can you please explain these syntax&lt;/P&gt;&lt;OL class="dp-sql" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; list-style-position: initial; list-style-image: initial; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;Data:&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;Load&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; *, DifferenceInTime * 24 &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; Difference;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;Load&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp; Interval(&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;TimeStamp&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;#([&lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;],&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'YYYY-MM-DD hh:mm:ss:ff'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;) - &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;TimeStamp&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;#([start &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;],&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'YYYY-MM-DD hh:mm:ss:ff'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:39:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting/m-p/1216337#M625042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-23T13:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting/m-p/1216338#M625043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) I have converted start date and end date into timestamp using TimeStamp# function.&lt;/P&gt;&lt;P&gt;Read below blog post to understand difference between TimeStamp and TimeStamp#.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-3102"&gt;QlikView Date fields&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Now you can find the difference between them. In case if we need to show more than 24 hours, use Interval function.&lt;/P&gt;&lt;P&gt;This will give you difference in hh:mm:ss format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Now multiply the result by 24 which will convert it to hours ... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting/m-p/1216338#M625043</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-11-23T13:49:40Z</dc:date>
    </item>
  </channel>
</rss>

