<?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: Convert unix time stamp to date and time in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384457#M1166453</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am sorry complete novice here, I tried the functions but did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the load code that we are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='£#,##0.00;-£#,##0.00';&lt;/P&gt;&lt;P&gt;SET TimeFormat='hh:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='MM/DD/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='MM/DD/YYYY hh:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO Qlick;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO Qlick;&lt;/P&gt;&lt;P&gt;//-------- Start Multiple Select Statements ------&lt;/P&gt;&lt;P&gt;LOAD `sample_timestamp`;&lt;/P&gt;&lt;P&gt;SQL SELECT `sample_timestamp`&lt;/P&gt;&lt;P&gt;FROM ddsresults.`session_fact_hour`;&lt;/P&gt;&lt;P&gt;//-------- End Multiple Select Statements ------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here sample_timestamp column has the all the date and time in unix format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we want to see the data in the normal date and time format.&lt;/P&gt;&lt;P&gt; the example of the unix format is 1341183600000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Sep 2012 09:29:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-06T09:29:27Z</dc:date>
    <item>
      <title>Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384453#M1166449</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;I am new to qlik view. The timestamp in table is in unix format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do we convert this in to date and time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please explain if there is a function and how to implement this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we use this at the load time by editing the script ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 13:00:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384453#M1166449</guid>
      <dc:creator />
      <dc:date>2012-09-05T13:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384454#M1166450</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;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;timestamp(&amp;lt;UnixTimeStamp&amp;gt;/ 86400 + 25569) as TS,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;date(floor(&amp;lt;UnixTimeStamp&amp;gt;/ 86400 + 25569)) as Date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;time(frac(&amp;lt;UnixTimeStamp&amp;gt;/ 86400 + 25569)) as Time,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 07:28:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384454#M1166450</guid>
      <dc:creator>rajni_batra</dc:creator>
      <dc:date>2012-09-06T07:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384455#M1166451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. But I am not sure where should i add this function. Can you please let us know how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 08:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384455#M1166451</guid>
      <dc:creator />
      <dc:date>2012-09-06T08:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384456#M1166452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the script only where u are loading that data otherwise firstly u can check this in a text box also&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 08:34:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384456#M1166452</guid>
      <dc:creator>rajni_batra</dc:creator>
      <dc:date>2012-09-06T08:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384457#M1166453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am sorry complete novice here, I tried the functions but did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the load code that we are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='£#,##0.00;-£#,##0.00';&lt;/P&gt;&lt;P&gt;SET TimeFormat='hh:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='MM/DD/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='MM/DD/YYYY hh:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO Qlick;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO Qlick;&lt;/P&gt;&lt;P&gt;//-------- Start Multiple Select Statements ------&lt;/P&gt;&lt;P&gt;LOAD `sample_timestamp`;&lt;/P&gt;&lt;P&gt;SQL SELECT `sample_timestamp`&lt;/P&gt;&lt;P&gt;FROM ddsresults.`session_fact_hour`;&lt;/P&gt;&lt;P&gt;//-------- End Multiple Select Statements ------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here sample_timestamp column has the all the date and time in unix format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we want to see the data in the normal date and time format.&lt;/P&gt;&lt;P&gt; the example of the unix format is 1341183600000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 09:29:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384457#M1166453</guid>
      <dc:creator />
      <dc:date>2012-09-06T09:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384458#M1166454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have never worked with this but i think&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;SQL SELECT `sample_timestamp`,&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;timestamp(&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;`sample_timestamp`&lt;/SPAN&gt;/ 86400 + 25569) as TS,&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;date(floor(&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt; `sample_timestamp`&lt;/SPAN&gt;/ 86400 + 25569)) as Date,&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;time(frac(&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt; `sample_timestamp`&lt;/SPAN&gt; 86400 + 25569)) as Time,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;FROM ddsresults.`session_fact_hour`;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;should work if this single filed contains date n Time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 09:42:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384458#M1166454</guid>
      <dc:creator>rajni_batra</dc:creator>
      <dc:date>2012-09-06T09:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384459#M1166455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help but when i try i get the following error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL##f - SqlState: 37000, ErrorCode: 1064, ErrorMsg: [MySQL][ODBC 5.1 Driver][mysqld-4.1.22-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( `sample_timestamp` 86400 + 25569)) as Time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM ddsresults.`session_fact_h' at line 4&lt;/P&gt;&lt;P&gt;SQL SELECT `sample_timestamp`,&lt;/P&gt;&lt;P&gt;timestamp(`sample_timestamp`/ 86400 + 25569) as TS,&lt;/P&gt;&lt;P&gt;date(floor( `sample_timestamp`/ 86400 + 25569)) as Date,&lt;/P&gt;&lt;P&gt;time(frac( `sample_timestamp` 86400 + 25569)) as Time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM ddsresults.`session_fact_hour`&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried removing the&amp;nbsp; "time(frac( `sample_timestamp` 86400 + 25569)) as Time" and the code runs. I assumed that this particular line is missing "/" in the function and there is an extra , at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even with these changes the code gives me an error as above and when i remove this line and run. the code runs but the results in the sample timestamp are still in unix time stamp format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 10:08:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384459#M1166455</guid>
      <dc:creator />
      <dc:date>2012-09-06T10:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384460#M1166456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/search.jspa?peopleEnabled=true&amp;amp;userID=&amp;amp;containerType=&amp;amp;container=&amp;amp;spotlight=true&amp;amp;q=unix format"&gt;http://community.qlik.com/search.jspa?peopleEnabled=true&amp;amp;userID=&amp;amp;containerType=&amp;amp;container=&amp;amp;spotlight=true&amp;amp;q=unix+format&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have a llok on this thread may be u get answer of ur question&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 10:18:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384460#M1166456</guid>
      <dc:creator>rajni_batra</dc:creator>
      <dc:date>2012-09-06T10:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384461#M1166457</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;The above suggestions do not work. I did manage to get this working as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConvertToLocalTime(timestamp((25569+(sample_timestamp+3600000)/(1000*24*3600))), 'GMT-01:00').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 14:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384461#M1166457</guid>
      <dc:creator />
      <dc:date>2012-09-12T14:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert unix time stamp to date and time</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384462#M1166458</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;Now that I have the date and time in the correct order.I want the data to be aggregated based on the timestamp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12/08/2012 08:00:00&amp;nbsp;&amp;nbsp; -----------Product1------------12 sales occured.&lt;/P&gt;&lt;P&gt;12/08/2012 08:00:00&amp;nbsp;&amp;nbsp; -----------Product2------------3sales occured.&lt;/P&gt;&lt;P&gt;12/08/2012 09:00:00------------Product1------------2sales occured.&lt;/P&gt;&lt;P&gt;12/08/2012 09:00:00------------Product2------------3sales occured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means between 7 and 8 12 sales occured and between 8 and 9 5 sales occured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I create a straight table, I get the data this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12/08/2012 08:00:00&amp;nbsp;&amp;nbsp; ---------Product1--------------14 sales occured.&lt;/P&gt;&lt;P&gt;12/08/2012 08:00:00&amp;nbsp;&amp;nbsp; -----------Product2------------6 sales occured.&lt;/P&gt;&lt;P&gt;12/08/2012 09:00:00-----------Product1----------------14 sales occured.&lt;/P&gt;&lt;P&gt;12/08/2012 09:00:00-----------Product2----------------6 sales occured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data is getting aggregating based on products . Can any one help me with this please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 14:16:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-unix-time-stamp-to-date-and-time/m-p/384462#M1166458</guid>
      <dc:creator />
      <dc:date>2012-09-12T14:16:48Z</dc:date>
    </item>
  </channel>
</rss>

