<?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: Number to timestamp in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Number-to-timestamp/m-p/1980708#M80932</link>
    <description>&lt;P&gt;just&amp;nbsp; the below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=hour(timestamp(44816,916666667))&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 06:18:49 GMT</pubDate>
    <dc:creator>vinieme12</dc:creator>
    <dc:date>2022-09-14T06:18:49Z</dc:date>
    <item>
      <title>Number to timestamp</title>
      <link>https://community.qlik.com/t5/App-Development/Number-to-timestamp/m-p/1980335#M80900</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;
&lt;P&gt;If i try to load a field into qlikview , lets name it MyField it gives a value as followed "44816,916666667" .&lt;/P&gt;
&lt;P&gt;If i set this Field's number format to TimeStamp in the documents properties it shows as "2022.09.12. 22:00:00".&lt;/P&gt;
&lt;P&gt;I would like to use this Field in an embedded if statement in the script as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;if(Hour(TimeStamp#(MyFieldname, 'h:mm:ss[.fff]'))=6 ,'1.hour', '2.hour) , so basically i'd like to get back the hour of the timestamp value, but the source format is not timestamp , but a basic integer (showed in the first sentence earlier).&lt;/P&gt;
&lt;P&gt;Could any1 help with this problem with these presented informations?&lt;BR /&gt;&lt;BR /&gt;Thank you all in advance!!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 11:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Number-to-timestamp/m-p/1980335#M80900</guid>
      <dc:creator>rczi</dc:creator>
      <dc:date>2022-09-13T11:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Number to timestamp</title>
      <link>https://community.qlik.com/t5/App-Development/Number-to-timestamp/m-p/1980420#M80911</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If my understanding is correct, you have managed to convert &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;"44816,916666667"&lt;/STRONG&gt;&lt;/SPAN&gt; value to &amp;nbsp;&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;"2022.09.12. 22:00:00"&lt;/STRONG&gt;&lt;/SPAN&gt; value, by using the expression &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;TimeStamp#&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;MyFieldname&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;, &lt;/STRONG&gt;&lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt;'h:mm:ss[.fff]'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;. Now you want to extract the &lt;STRONG&gt;HOURS &lt;/STRONG&gt;part of the new value to use it within an &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;If&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;I&gt;You have specified that this is a Qlik Sense question but you mention QlikView in the description. I will share with you a solution to similar issue but for Qlik Sense since it is posted in Qlik Sense.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe it is easier to use the &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;SubField&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; function and just extra the data that you want. For example the format that you have is &lt;SPAN style="color:hsl(270, 75%, 60%);"&gt;&lt;STRONG&gt;YYYY.MM.DD h:mm:ss&lt;/STRONG&gt;&lt;/SPAN&gt;, which means that all you have to do is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;SubField&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;SubField&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color:hsl(270, 75%, 60%);"&gt;&lt;STRONG&gt;EXPRESSION&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;, &lt;/STRONG&gt;&lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt;' '&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;, 2),&lt;/STRONG&gt;&lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt; ':'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;, 1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color:hsl(270,75%,60%);"&gt;&lt;STRONG&gt;EXPRESSION &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:hsl(0, 0%, 0%);"&gt;is the expression that gives you&amp;nbsp;&lt;/SPAN&gt; &lt;SPAN style="color:hsl(210,75%,60%);"&gt;&lt;STRONG&gt;"2022.09.12. 22:00:00" &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:hsl(0, 0%, 0%);"&gt;as output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The inner &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;SubField() &lt;/STRONG&gt;&lt;/SPAN&gt;will spilt the value to &lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt;"2022.09.12."&lt;/STRONG&gt;&lt;/SPAN&gt; and &lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt;"22:00:00"&lt;/STRONG&gt;&lt;/SPAN&gt; and then will return &lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt;"22:00:00"&lt;/STRONG&gt;&lt;/SPAN&gt;. After that the top level &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;SubField() &lt;/STRONG&gt;&lt;/SPAN&gt;will split the value &lt;SPAN style="color:hsl(0, 75%, 60%);"&gt;&lt;STRONG&gt;"22:00:00"&lt;/STRONG&gt;&lt;/SPAN&gt; to&lt;SPAN style="color:hsl(0, 75%, 60%);"&gt;&lt;STRONG&gt; "22"&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;SPAN style="color:hsl(0, 75%, 60%);"&gt;&lt;STRONG&gt; "00"&lt;/STRONG&gt;&lt;/SPAN&gt; and &lt;SPAN style="color:hsl(0, 75%, 60%);"&gt;&lt;STRONG&gt;"00"&lt;/STRONG&gt;&lt;/SPAN&gt; and return the value &lt;SPAN style="color:hsl(0, 75%, 60%);"&gt;&lt;STRONG&gt;"22"&lt;/STRONG&gt;&lt;/SPAN&gt;. So now you have the hours and you can use them in the &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;If&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/209ecc32-fa5f-4bbe-81b9-28f661a7121f.default.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color:hsl(0, 0%, 60%);"&gt;&lt;I&gt;&lt;STRONG&gt;I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members.&amp;nbsp;&lt;/STRONG&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 13:31:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Number-to-timestamp/m-p/1980420#M80911</guid>
      <dc:creator>Andrei_Cusnir</dc:creator>
      <dc:date>2022-09-13T13:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Number to timestamp</title>
      <link>https://community.qlik.com/t5/App-Development/Number-to-timestamp/m-p/1980708#M80932</link>
      <description>&lt;P&gt;just&amp;nbsp; the below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=hour(timestamp(44816,916666667))&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 06:18:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Number-to-timestamp/m-p/1980708#M80932</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-09-14T06:18:49Z</dc:date>
    </item>
  </channel>
</rss>

