<?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: Problems with Datetime Format in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012612#M1221813</link>
    <description>&lt;P&gt;Date(DayName(Timestamp#('20211112075518828','YYYYMMDDHHmmssfff')),'DD.MM.YYYY')&lt;/P&gt;
&lt;P&gt;If this doesn't work on your end, your input is probably different from what you described, since the syntax itself is correct for the example you provided.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Dec 2022 10:27:39 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2022-12-05T10:27:39Z</dc:date>
    <item>
      <title>Problems with Datetime Format</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012029#M1221790</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;
&lt;P&gt;we have a QliKSense App, which is connected to our CRM-Database.&lt;/P&gt;
&lt;P&gt;Now, we got the problem to transform the date format of CRM (example: 20211112075518828) to our standard date format (DD.MM.YYYY).&lt;/P&gt;
&lt;P&gt;We tried different codings, but nothing works perfectly, yet.&lt;/P&gt;
&lt;P&gt;The best code is following:&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;LI-CODE lang="markup"&gt;LOAD 
    ID, 
    Upd as Upd_raw,
    Date(Date#(Left(Upd, 9), 'Y,YYYMMDD')) As Upd
    ;

[CRM_KM]:
SELECT 
	ID,
	Upd
FROM CRMU9.dbo."CRM_KM";&lt;/LI-CODE&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;But this code gets us as example this date: 12.11.0021 &lt;STRONG&gt;(Here's missing the leading 2 of the year!)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Does anybody know this problem and a solution?&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 11:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012029#M1221790</guid>
      <dc:creator>heid_f</dc:creator>
      <dc:date>2022-12-02T11:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Datetime Format</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012047#M1221791</link>
      <description>&lt;P&gt;As below.&lt;/P&gt;
&lt;P&gt;Date(Date#(Left(Upd,8),'YYYYMMDD'),'DD.MM.YYYY') as Upd&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 11:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012047#M1221791</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-12-02T11:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Datetime Format</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012084#M1221794</link>
      <description>&lt;P&gt;Sadly, your solution doesn't work.&lt;/P&gt;
&lt;P&gt;The function Left(Upd,8) brings following value: 2,0211112&lt;/P&gt;
&lt;P&gt;(Always with a comma)&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 13:10:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012084#M1221794</guid>
      <dc:creator>heid_f</dc:creator>
      <dc:date>2022-12-02T13:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Datetime Format</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012471#M1221809</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;date#(timestamp#(20211112075518828, 'YYYYMMDDHHMMSSSSS'), 'DD.MM.YYYY') as Date&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 17:01:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012471#M1221809</guid>
      <dc:creator>TimothyB99</dc:creator>
      <dc:date>2022-12-04T17:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Datetime Format</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012607#M1221812</link>
      <description>&lt;P&gt;Thanks, but Sadly this doesn't work, too.&lt;BR /&gt;The functions return the same string as input: &lt;SPAN&gt;20211112075518828&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 10:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012607#M1221812</guid>
      <dc:creator>heid_f</dc:creator>
      <dc:date>2022-12-05T10:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Datetime Format</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012612#M1221813</link>
      <description>&lt;P&gt;Date(DayName(Timestamp#('20211112075518828','YYYYMMDDHHmmssfff')),'DD.MM.YYYY')&lt;/P&gt;
&lt;P&gt;If this doesn't work on your end, your input is probably different from what you described, since the syntax itself is correct for the example you provided.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 10:27:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012612#M1221813</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-12-05T10:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Datetime Format</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012615#M1221814</link>
      <description>&lt;P&gt;Hey, thanks!&lt;BR /&gt;Your example works with a fix string '&lt;SPAN&gt;20211112075518828&lt;/SPAN&gt;', but not if I put in my database field.&lt;/P&gt;
&lt;P&gt;I think the problem is, the database field is being interpreted as number and I'm not able to convert it to a string. Following code, doesn't work, too.&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date(DayName(Timestamp#(Text(Upd),'YYYYMMDDHHmmssfff')),'DD.MM.YYYY') as test2,&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Dec 2022 10:32:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012615#M1221814</guid>
      <dc:creator>heid_f</dc:creator>
      <dc:date>2022-12-05T10:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Datetime Format</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012621#M1221815</link>
      <description>&lt;P&gt;If for some reason this is being interpreted as a number, you're going to have issues because the length exceeds Qlik's allowed precision for numeric values. That said, if this was the case, Text() should do the trick. You  may want to load Text(Upd) and see what comes out, and then adjust the expression based on that. &lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 10:42:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012621#M1221815</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-12-05T10:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Datetime Format</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012642#M1221816</link>
      <description>&lt;P&gt;Yeah, as I said before, I tried the Text() function... But it doesn't works.&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;In Diagrams, this code works perfectly: =Date(Date#(Left(Upd_raw, 8), 'YYYYMMDD'))&lt;BR /&gt;&lt;BR /&gt;But not in the Script. But I need it here to work, because it's a KEY field.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 11:12:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Datetime-Format/m-p/2012642#M1221816</guid>
      <dc:creator>heid_f</dc:creator>
      <dc:date>2022-12-05T11:12:18Z</dc:date>
    </item>
  </channel>
</rss>

