<?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: How to create Timestamps between two Date/Hours in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/965#M69</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Alessandro,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Step 1&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I would add a data hour table with ALL dates and hours over the report measurement period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Table name = T_DateHour&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field Name = DateHour&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field Example = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;01 jan 2017 14:00,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;01 jan 2017 15:00&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Step 2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Create same field in your current data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field Name = DateHour&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field Example = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;01 jan 2017 14:00,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;01 jan 2017 15:00&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new table should then key into your old data using the DateHour field and your report will have the date hour field available to select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Darrell&lt;/P&gt;&lt;P&gt;Please mark as correct or helpful if applicable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jan 2018 13:26:51 GMT</pubDate>
    <dc:creator>darrell_tobin</dc:creator>
    <dc:date>2018-01-15T13:26:51Z</dc:date>
    <item>
      <title>How to create Timestamps between two Date/Hours</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/962#M66</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;could anyone help me in this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've to gather data from an Excel file in which there's just some values, by date and hour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loading that data I've to fill all the rows between two date/hours, automatically creating ALL the inter-current date/hours; after do this I've to divide the next value by the inter-current rows count, but this is simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main problem is the first: how to fill all rows creating all the inter-current date/hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="ExcelTimestampFill.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/190091_ExcelTimestampFill.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Alessandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 12:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/962#M66</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2018-01-15T12:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Timestamps between two Date/Hours</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/963#M67</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check here on how to create all dates between two dates using while loop...&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3274"&gt;Loops in the Script&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same logic will go for DateTimes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 12:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/963#M67</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-15T12:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Timestamps between two Date/Hours</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/964#M68</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe something like this to create hours between 2 date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// test data&lt;/P&gt;&lt;P&gt;&lt;EM&gt;S:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Floor(rand()*100) as Value1, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Floor(rand()*100) as Value2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;inline [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Date&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;18/01/2018 03:00:00&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;17/01/2018 03:00:00&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;16/01/2018 16:00:00&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;16/01/2018 08:00:00&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;15/01/2018 22:00:00&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;31/12/2017 23:00:00&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// add DateTo&lt;/P&gt;&lt;P&gt;&lt;EM&gt;S1:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowNo() as Id, Value1, Value2,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, Alt(Peek(Date), Date) as DateTo&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident S&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Order By Date desc; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table S;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// add Hours between Date....DateTo&lt;/P&gt;&lt;P&gt;&lt;EM&gt;F:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp(Date + (IterNo()-1) / (24)) as DateTime&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident S1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;While (Date + (IterNo()-1) / (24)) &amp;lt;= (DateTo);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table S1;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 13:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/964#M68</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2018-01-15T13:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Timestamps between two Date/Hours</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/965#M69</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Alessandro,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Step 1&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I would add a data hour table with ALL dates and hours over the report measurement period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Table name = T_DateHour&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field Name = DateHour&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field Example = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;01 jan 2017 14:00,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;01 jan 2017 15:00&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Step 2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Create same field in your current data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field Name = DateHour&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field Example = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;01 jan 2017 14:00,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;01 jan 2017 15:00&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new table should then key into your old data using the DateHour field and your report will have the date hour field available to select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Darrell&lt;/P&gt;&lt;P&gt;Please mark as correct or helpful if applicable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 13:26:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/965#M69</guid>
      <dc:creator>darrell_tobin</dc:creator>
      <dc:date>2018-01-15T13:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Timestamps between two Date/Hours</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/966#M70</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimo,&lt;/P&gt;&lt;P&gt;thanks for the suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one last question: how can I split values dividing them by the number of Days/Hours Between two dates, using your solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;05/02/2018&amp;nbsp; Value 1=&lt;STRONG&gt;1000&lt;/STRONG&gt;&amp;nbsp; Value2=&lt;STRONG&gt;1500&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Date:&lt;/P&gt;&lt;P&gt;28/01/2018 Value 1:500 Value 2= 800&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've to divide the last Values (&lt;STRONG&gt;1000&lt;/STRONG&gt; and &lt;STRONG&gt;1500&lt;/STRONG&gt;) splitting them f&lt;STRONG&gt;or all Days and Hours between 29/01/2018 &lt;/STRONG&gt;(the first missed date after 28/01/2018)&lt;STRONG&gt; and 05/02/2018&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Alessandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 07:53:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-create-Timestamps-between-two-Date-Hours/m-p/966#M70</guid>
      <dc:creator>arnould_it</dc:creator>
      <dc:date>2018-02-12T07:53:03Z</dc:date>
    </item>
  </channel>
</rss>

