<?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 How do I turn a date offset into a date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-do-I-turn-a-date-offset-into-a-date/m-p/16249#M1121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a database (sterling Gentran for Windows) that stores a date as an interger representing the number of seconds from midnight of 1/1/1970 GMT that an activity happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example the datebase shows a created time of 1497224413&lt;/P&gt;&lt;P&gt;Which represents 06/11/2017 17:40:13 CST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to get this data as a datetime in Qlik? I can use the follwoing SQL script to convert it to CST.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt; font-family: Consolas;"&gt;dateadd&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt; font-family: Consolas;"&gt;second&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;,(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;TimeCreated + &lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;(-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;6&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;3600&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Consolas;"&gt;'1/1/1970'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; TimeCreated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;The issue occurs when I store that and want to retrieve in local time. Depending on the time of year the hour offset changes from -6 to -5. Given that Qlik stores timestamps as integers as well and handles the time zone conversion, is there an easy way to covert the Gentran offset to the Qlik Integer and store it that way? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Or is there an easier way to handle this? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jan 2018 17:52:00 GMT</pubDate>
    <dc:creator>tim_ringle</dc:creator>
    <dc:date>2018-01-29T17:52:00Z</dc:date>
    <item>
      <title>How do I turn a date offset into a date</title>
      <link>https://community.qlik.com/t5/App-Development/How-do-I-turn-a-date-offset-into-a-date/m-p/16249#M1121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a database (sterling Gentran for Windows) that stores a date as an interger representing the number of seconds from midnight of 1/1/1970 GMT that an activity happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example the datebase shows a created time of 1497224413&lt;/P&gt;&lt;P&gt;Which represents 06/11/2017 17:40:13 CST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to get this data as a datetime in Qlik? I can use the follwoing SQL script to convert it to CST.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt; font-family: Consolas;"&gt;dateadd&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-size: 10pt; font-family: Consolas;"&gt;second&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;,(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;TimeCreated + &lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;(-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;6&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;3600&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Consolas;"&gt;'1/1/1970'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; TimeCreated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;The issue occurs when I store that and want to retrieve in local time. Depending on the time of year the hour offset changes from -6 to -5. Given that Qlik stores timestamps as integers as well and handles the time zone conversion, is there an easy way to covert the Gentran offset to the Qlik Integer and store it that way? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Or is there an easier way to handle this? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 17:52:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-do-I-turn-a-date-offset-into-a-date/m-p/16249#M1121</guid>
      <dc:creator>tim_ringle</dc:creator>
      <dc:date>2018-01-29T17:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I turn a date offset into a date</title>
      <link>https://community.qlik.com/t5/App-Development/How-do-I-turn-a-date-offset-into-a-date/m-p/16250#M1122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp(25569 + TimeCreated / 86400)&amp;nbsp; as TimeCreated,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Use Qlik time functions like ConvertToLocalTime() for your timezone conversion.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 19:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-do-I-turn-a-date-offset-into-a-date/m-p/16250#M1122</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-01-29T19:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I turn a date offset into a date</title>
      <link>https://community.qlik.com/t5/App-Development/How-do-I-turn-a-date-offset-into-a-date/m-p/16251#M1123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;That is exactly what i was hoping for. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 19:16:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-do-I-turn-a-date-offset-into-a-date/m-p/16251#M1123</guid>
      <dc:creator>tim_ringle</dc:creator>
      <dc:date>2018-01-29T19:16:40Z</dc:date>
    </item>
  </channel>
</rss>

