<?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: Unix Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053744#M931299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post a small qlikview document with sample data that demonstrates the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Mar 2016 11:13:23 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-03-11T11:13:23Z</dc:date>
    <item>
      <title>Unix Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053740#M931289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have a field which when loaded into qlik appears as a Unix date. To overcome this, I wrote the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Date(((NoteValue / 1000) /86400) + 25569))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I noticed in the raw data that I was getting a handful of dates that were 01/01/1970.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the main front application of the system this data is entered into, and it appears below are entering 2 formats. Some are entering it as 25 Jan 2016 and some are entering it as 25-01-2016.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore I wrote this expression, but it doesnt notice the first if criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((Date(((NoteValue / 1000) /86400) + 25569))='01/01/1970', NoteValue,(Date(((NoteValue / 1000) /86400) + 25569)))&amp;nbsp; as rep_S2, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053740#M931289</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053741#M931290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Usually one uses something like this to turn a unix timestamp into a date:&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;If(unixtime,TimeStamp(Makedate(1970,1,1)+ unixtime /24/60/60))&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;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;If you need to convert multiple sort of date strings into a date you can try something like&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;Alt( date#(MyDate, 'DD-MM-YYYY'), &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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alt(date#(MyDate, 'DD MMM YYYY'), &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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alt(...etc))) as MyDate&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 10:40:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053741#M931290</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-11T10:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053742#M931294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post sample code of the application to see...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 10:40:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053742#M931294</guid>
      <dc:creator />
      <dc:date>2016-03-11T10:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053743#M931298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No this hasnt worked. I added the following:&lt;/P&gt;&lt;P&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;If(unixtime,TimeStamp(Makedate(1970,1,1)+ &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;NoteValue &lt;/SPAN&gt;/24/60/60))&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;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;and the 01/01/1970 dates still appear. And then the Unix dates are appearing as 16892569&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;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;Thanks.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 11:07:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053743#M931298</guid>
      <dc:creator />
      <dc:date>2016-03-11T11:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053744#M931299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post a small qlikview document with sample data that demonstrates the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 11:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unix-Dates/m-p/1053744#M931299</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-11T11:13:23Z</dc:date>
    </item>
  </channel>
</rss>

