<?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: SQL error when converting the date format from yyyymmdd to dd/mm/yyyy in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-error-when-converting-the-date-format-from-yyyymmdd-to-dd-mm/m-p/1937469#M1219212</link>
    <description>&lt;P&gt;I tried your suggestions and they worked perfectly. Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/50135"&gt;@vamsee&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;Load &lt;BR /&gt;   *,&lt;BR /&gt;   Date(Date#(CreatedOnDate,'YYYYMMDD'),'MM/DD/YYYY') as NewCreatedOnDate;&lt;BR /&gt;SQL Select&lt;BR /&gt;   "AUFNR" as "OrderNo",&lt;BR /&gt;   "AUART" as "OrderType",&lt;BR /&gt;   "WERKS" as "Plant",&lt;BR /&gt;   "MTRLNO" as "MaterialNo",&lt;BR /&gt;   "ERDAT" as "CreatedOnDate"&lt;BR /&gt;From "_SYS_BIC"."QV" &lt;BR /&gt;Group By "AUFNR",&lt;BR /&gt;   "AUART",&lt;BR /&gt;   "WERKS",&lt;BR /&gt;   "MTRLNO",&lt;BR /&gt;   "ERDAT";&lt;/PRE&gt;</description>
    <pubDate>Tue, 31 May 2022 04:37:53 GMT</pubDate>
    <dc:creator>Lily</dc:creator>
    <dc:date>2022-05-31T04:37:53Z</dc:date>
    <item>
      <title>SQL error when converting the date format from yyyymmdd to dd/mm/yyyy</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error-when-converting-the-date-format-from-yyyymmdd-to-dd-mm/m-p/1934516#M1219108</link>
      <description>&lt;P&gt;I'm having difficulty converting date format from yyyymmdd (e.g.: 20210515) to dd/mm/yyyy&amp;nbsp;(e.g.: 15/05/2021) .&lt;/P&gt;
&lt;P&gt;I tried several QV community sample scripts to convert the date but still unsuccessful. Here's an example load script that I tried:&lt;/P&gt;
&lt;P&gt;i)&amp;nbsp; Date(Date#("ERDAT",'YYYYMMDD'),'MM/DD/YYYY') as "CreatedOnDateNew", &lt;BR /&gt;ii) Date(alt(Date#("ERDAT", 'YYYYMMDD')), 'DD/MM/YYYY') as "CreatedOnDateNew",&lt;/P&gt;
&lt;P&gt;My load script:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Load *;&lt;BR /&gt;SQL Select&lt;BR /&gt;"AUFNR" as "OrderNo",&lt;BR /&gt;"AUART" as "OrderType",&lt;BR /&gt;"WERKS" as "Plant",&lt;BR /&gt;"MTRLNO" as "MaterialNo",&lt;BR /&gt;"ERDAT" as "CreatedOnDate", &lt;BR /&gt;//Date(Date#("ERDAT",'YYYYMMDD'),'MM/DD/YYYY') as "NewCreatedOnDate", &lt;BR /&gt;Date(alt(Date#("ERDAT", 'YYYYMMDD')), 'DD/MM/YYYY') as "NewCreatedOnDate" &lt;BR /&gt;From "_SYS_BIC"."QV" &lt;BR /&gt;Group By "AUFNR",&lt;BR /&gt;"AUART",&lt;BR /&gt;"WERKS",&lt;BR /&gt;"MTRLNO",&lt;BR /&gt;"ERDAT";&lt;/PRE&gt;
&lt;P&gt;However, I encountered an error when I trying to load the script as below:&lt;/P&gt;
&lt;PRE&gt;SQL##f - SqlState: S1000, ErrorCode: 328, ErrorMsg: [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;328 invalid name of function or procedure: DATE: line 24 col 3 (at pos 614)&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Any Idea how can I resolve this?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 04:24:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error-when-converting-the-date-format-from-yyyymmdd-to-dd-mm/m-p/1934516#M1219108</guid>
      <dc:creator>Lily</dc:creator>
      <dc:date>2022-05-31T04:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: SQL error when converting the date format from yyyymmdd to dd/mm/yyyy</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error-when-converting-the-date-format-from-yyyymmdd-to-dd-mm/m-p/1936244#M1219168</link>
      <description>&lt;P&gt;Try using the same date scripts in the load statement instead of the Select statement&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date(Date#(ERDAT,'YYYYMMDD'),'MM/DD/YYYY') as CreatedOnDateNew,&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 26 May 2022 20:25:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error-when-converting-the-date-format-from-yyyymmdd-to-dd-mm/m-p/1936244#M1219168</guid>
      <dc:creator>vamsee</dc:creator>
      <dc:date>2022-05-26T20:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: SQL error when converting the date format from yyyymmdd to dd/mm/yyyy</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error-when-converting-the-date-format-from-yyyymmdd-to-dd-mm/m-p/1937469#M1219212</link>
      <description>&lt;P&gt;I tried your suggestions and they worked perfectly. Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/50135"&gt;@vamsee&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;Load &lt;BR /&gt;   *,&lt;BR /&gt;   Date(Date#(CreatedOnDate,'YYYYMMDD'),'MM/DD/YYYY') as NewCreatedOnDate;&lt;BR /&gt;SQL Select&lt;BR /&gt;   "AUFNR" as "OrderNo",&lt;BR /&gt;   "AUART" as "OrderType",&lt;BR /&gt;   "WERKS" as "Plant",&lt;BR /&gt;   "MTRLNO" as "MaterialNo",&lt;BR /&gt;   "ERDAT" as "CreatedOnDate"&lt;BR /&gt;From "_SYS_BIC"."QV" &lt;BR /&gt;Group By "AUFNR",&lt;BR /&gt;   "AUART",&lt;BR /&gt;   "WERKS",&lt;BR /&gt;   "MTRLNO",&lt;BR /&gt;   "ERDAT";&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 May 2022 04:37:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error-when-converting-the-date-format-from-yyyymmdd-to-dd-mm/m-p/1937469#M1219212</guid>
      <dc:creator>Lily</dc:creator>
      <dc:date>2022-05-31T04:37:53Z</dc:date>
    </item>
  </channel>
</rss>

