<?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 AW:Re: AW:Formatting date fields coming from SAP-BWP in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237232#M88318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goodmorning, any new suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alberto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Aug 2010 14:47:36 GMT</pubDate>
    <dc:creator>googel84</dc:creator>
    <dc:date>2010-08-05T14:47:36Z</dc:date>
    <item>
      <title>Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237225#M88311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goodmorning, this is my first post in QlikView community forum so, as you can think, I'm pretty new to QlikView scripting language.&lt;/P&gt;&lt;P&gt;The problem I'm facing concerns formatting of date fields as they come from SAP-BW in a better way then we do at the moment.&lt;/P&gt;&lt;P&gt;Two extracts of the code I'd like to receive suggestion about follows.&lt;/P&gt;&lt;H3&gt;Default settings&lt;/H3&gt;&lt;H4&gt;&lt;/H4&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&amp;lt;/h4&amp;gt;&lt;BR /&gt;SET ThousandSep='.';&lt;BR /&gt;SET DecimalSep=',';&lt;BR /&gt;SET MoneyThousandSep='.';&lt;BR /&gt;SET MoneyDecimalSep=',';&lt;BR /&gt;SET MoneyFormat='€ #.##0,00;-€ #.##0,00';&lt;BR /&gt;SET TimeFormat='h.mm.ss';&lt;BR /&gt;SET DateFormat='DD/MM/YYYY';&lt;BR /&gt;SET TimestampFormat='DD/MM/YYYY h.mm.ss[.fff]';&lt;BR /&gt;SET MonthNames='Gen;Feb;Mar;Apr;Mag;Giu;Lug;Ago;Set;Ott;Nov;Dic';&lt;BR /&gt;SET DayNames='Lun;Mar;Mer;Gio;Ven;Sab;Dom';&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Here I set the default variables according to my PC regional settings.&lt;/P&gt;&lt;H3&gt;Date management&lt;BR /&gt;&lt;/H3&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;[Campagna di vendita (temp)]:&lt;BR /&gt;SQL SELECT&lt;BR /&gt; "SALESDEAL",&lt;BR /&gt; "COMP_CODE",&lt;BR /&gt; "DISTR_CHAN",&lt;BR /&gt; "SALESORG",&lt;BR /&gt; "DATEFROM",&lt;BR /&gt; "DATETO"&lt;BR /&gt; FROM SAPBWP."/BI0/PSALESDEAL"&lt;BR /&gt; WHERE&lt;BR /&gt; "OBJVERS" = 'A';&lt;BR /&gt;INNER JOIN SELECT&lt;BR /&gt; "SALESDEAL",&lt;BR /&gt; "TXTLG"&lt;BR /&gt; FROM SAPBWP."/BI0/TSALESDEAL";&lt;BR /&gt;&lt;BR /&gt;[Campagna di vendita]:&lt;BR /&gt;LOAD&lt;BR /&gt; [SALESDEAL] AS [Campagna di vendita],&lt;BR /&gt; [COMP_CODE] AS [Società],&lt;BR /&gt; [DISTR_CHAN] AS [Canale di distribuzione],&lt;BR /&gt; [SALESORG] AS [Organizzazione commerciale],&lt;BR /&gt; makedate(left("DATEFROM",4),mid("DATEFROM",5,2),right("DATEFROM",2)) AS [Inizio validità],&lt;BR /&gt; makedate(left("DATETO",4),mid("DATETO",5,2),right("DATETO",2)) AS [Fine validità],&lt;BR /&gt; [TXTLG] AS "Campagna di vendita (descr.)"&lt;BR /&gt;RESIDENT [Campagna di vendita (temp)];&lt;BR /&gt;&lt;BR /&gt;STORE [Campagna di vendita] INTO VEN_BW_IOB_Campagna di vendita.qvd;&lt;BR /&gt;DROP TABLE [Campagna di vendita (temp)];&lt;BR /&gt;DROP TABLE [Campagna di vendita];&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;The objective is to load the records we need from a table and formatting date field as a date and not as a number. These fields come as strings with the following format: YYYYMMDD (no separation characters).&lt;/P&gt;&lt;P&gt;As you can see, I loaded data twice: the first time from BW using a SELECT statement but without setting aliases and without formatting any date field (because the language interpreter did not let me do it) and then from the internal table &lt;I&gt;Campagna di vendita (temp)&lt;/I&gt; with a LOAD statement. This turn, I was able to set aliases and formatting date fields by means of &lt;I&gt;makedate&lt;/I&gt; function.&lt;/P&gt;&lt;P&gt;At the end I store the resulting table into a qvd file and drop the tables.&lt;/P&gt;&lt;P&gt;Here is my first question: is there a better way to reach the same result? It's clear that it's a waste of resource, even if I'm able to see date fields correctly formatted when using a List Box to show them.&lt;/P&gt;&lt;P&gt;Now I have an other doubt. The fact is that when I try to build a Table Box using date fields as dimensions, it seems the fields looses their format and are seen as number again and there's no way to change this behavior manually from Table Box property.&lt;/P&gt;&lt;P&gt;What am I mistaking?&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alberto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jul 2010 20:08:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237225#M88311</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-07-28T20:08:58Z</dc:date>
    </item>
    <item>
      <title>AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237226#M88312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;I'd try to do the LOAD-statement before the SQL - thus you wouldn't have to load the data a second time (resident). In the LOAD-statement, you might use the 'date#()'-function as follows:&lt;/P&gt;&lt;P&gt;LOAD...&lt;/P&gt;&lt;P&gt;date#(DATEFROM, 'YYYYMMDD') as DateFrom,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;SQL...&lt;/P&gt;&lt;P&gt;Hope, this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Helmut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jul 2010 21:06:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237226#M88312</guid>
      <dc:creator />
      <dc:date>2010-07-28T21:06:10Z</dc:date>
    </item>
    <item>
      <title>AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237227#M88313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helmut, I'm sorry but your suggestion is not applicable because the LOAD statement loads data from a file and doesn't let us charging from a DB2 table (DB2 is the DBMS under our SAP-BW).&lt;/P&gt;&lt;P&gt;I tried it anyway and the error I get is the following:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/5468.error.JPG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/5468.error.JPG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 08:41:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237227#M88313</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-07-29T08:41:59Z</dc:date>
    </item>
    <item>
      <title>Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237228#M88314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;date(makedate(left(Trim(SAP_DATE),4),mid(Trim(SAP_DATE),5,2),right(Trim(SAP_DATE),2))) as Converted_DATE&lt;/P&gt;&lt;P&gt;Pls Try This one. It is tested logic in SAP BW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 14:08:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237228#M88314</guid>
      <dc:creator>suniljain</dc:creator>
      <dc:date>2010-07-29T14:08:49Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237229#M88315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alberto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you then might want to swap again (LOAD after SQL). But the syntax stays the same, try&lt;/P&gt;&lt;P&gt;LOAD...&lt;/P&gt;&lt;P&gt;date#("DATEFROM", 'YYYYMMDD') as DateFrom,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Helmut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 14:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237229#M88315</guid>
      <dc:creator />
      <dc:date>2010-07-29T14:18:21Z</dc:date>
    </item>
    <item>
      <title>Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237230#M88316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried it but I don't see any difference as compared to makedate(left("DATEFROM",4),mid("DATEFROM",5,2),right("DATEFROM",2)).&lt;/P&gt;&lt;P&gt;However, now I think the second and less important part of my post is answered. Probably the strange behavior described was caused by a wrong Table Box configuration. To be more precise, now I see the same values both in the List Box and in the Table Box.&lt;/P&gt;&lt;P&gt;The important case is the one described above, at the beginning of the post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 15:12:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237230#M88316</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-07-29T15:12:00Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237231#M88317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helmut, the &lt;I&gt;date#&lt;/I&gt; function returns the number associated to the date passed, and it's not what I'm looking for; but I used it to reach the same result as with &lt;I&gt;makedate&lt;/I&gt; in a shorter way:&lt;/P&gt;&lt;P style="text-align:center;"&gt;date(date#("DATEFROM",'YYYYMMDD')&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 15:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237231#M88317</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-07-29T15:19:02Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237232#M88318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goodmorning, any new suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alberto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 14:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237232#M88318</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-08-05T14:47:36Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237233#M88319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you please provide a (small) qvw to show the difference between what you get and what you want it be?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Helmut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 14:55:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237233#M88319</guid>
      <dc:creator />
      <dc:date>2010-08-05T14:55:17Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237234#M88320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helmut, I'm sorry for the dealy.&lt;/P&gt;&lt;P&gt;Here is the qvw you requested.&lt;/P&gt;&lt;P&gt;As you can see, I do 2 loading cycles (SELECT and then LOAD statements) to have &lt;I&gt;DATEFROM&lt;/I&gt; and &lt;I&gt;DATETO&lt;/I&gt; correctly formatted into, respectively, &lt;I&gt;Inizio validità&lt;/I&gt; and &lt;I&gt;Fine validità&lt;/I&gt;. So, these last two fields are the result we'd like to reach without, if possible, doing the second cycle.&lt;/P&gt;&lt;P&gt;I also tried to apply date format directly into the SELECT statement, looking at DB2 online documentation. The function I used in another script is the following:&lt;/P&gt;&lt;P style="text-align:center;"&gt;DATE(SUBSTR(DOC_DATE, 7, 2)||'.'||SUBSTR(DOC_DATE, 5, 2)||'.'||SUBSTR(DOC_DATE,1, 4)) AS "DOC_DATE_CONV"&lt;/P&gt;&lt;P&gt;The problem with this function is that the date a get is not in the right format: MM/DD/YYYY instead of DD/MM/YYYY.&lt;/P&gt;&lt;P&gt;Anyway, the more I become familiar to QlikView, the more I think that the only way to avoid a second cycle is to find the way to use "standard" SQL.&lt;/P&gt;&lt;P&gt;Do you agree with me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 13:36:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237234#M88320</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-08-11T13:36:22Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237235#M88321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helmut, I'm sorry for the dealy.&lt;/P&gt;&lt;P&gt;Here is the qvw you requested.&lt;/P&gt;&lt;P&gt;As you can see, I do 2 loading cycles (SELECT and then LOAD statements) to have &lt;I&gt;DATEFROM&lt;/I&gt; and &lt;I&gt;DATETO&lt;/I&gt; correctly formatted into, respectively, &lt;I&gt;Inizio validità&lt;/I&gt; and &lt;I&gt;Fine validità&lt;/I&gt;. These last two fields are the result we'd like to reach without, if possible, doing the second cycle.&lt;/P&gt;&lt;P&gt;I also tried to apply date format directly into the SELECT statement, looking at DB2 online documentation. The function I used in another script is the following:&lt;/P&gt;&lt;P style="text-align:center;"&gt;DATE(SUBSTR(DOC_DATE, 7, 2)||'.'||SUBSTR(DOC_DATE, 5, 2)||'.'||SUBSTR(DOC_DATE,1, 4)) AS "DOC_DATE_CONV"&lt;/P&gt;&lt;P&gt;The problem with this function is that the date a get is not in the right format: MM/DD/YYYY instead of DD/MM/YYYY.&lt;/P&gt;&lt;P&gt;Anyway, the more I become familiar to QlikView, the more I think that the only way to avoid a second cycle is to find the way to use "standard" SQL.&lt;/P&gt;&lt;P&gt;Do you agree with me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 13:37:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237235#M88321</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-08-11T13:37:45Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237236#M88322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry for the delay, as well.&lt;/P&gt;&lt;P&gt;What happens if you try to use the expressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;makedate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(left("DATEFROM",4),mid("DATEFROM",5,2),right("DATEFROM",2)) &lt;B&gt;AS&lt;/B&gt; [Inizio validità],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;makedate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(left("DATETO",4),mid("DATETO",5,2),right("DATETO",2)) &lt;B&gt;AS&lt;/B&gt; [Fine validità],&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;in your SQL-statement? Do you get any errors loading or only in formatting the datefields right?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Helmut&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;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 17:26:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237236#M88322</guid>
      <dc:creator />
      <dc:date>2010-08-17T17:26:53Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237237#M88323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helmut, I tried what you suggest even if I knew it would have probably brought me to an error because we did it at the beginning.&lt;/P&gt;&lt;P style="text-align:center;"&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/4885.error-I-get.bmp"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/4885.error-I-get.bmp" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The fact is that using &lt;I&gt;SELECT&lt;/I&gt; statement means using "standard" SQL.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 09:36:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237237#M88323</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-08-18T09:36:14Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Re: AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237238#M88324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;I'd try to use LOAD before SELECT like this:&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;&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;&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;BR /&gt;&lt;BR /&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;&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;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;[Campagna di vendita]:&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[COMP_CODE]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;AS&lt;/B&gt; [Società],&lt;/P&gt;&lt;P&gt;[DISTR_CHAN]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;AS&lt;/B&gt; [Canale di distribuzione],&lt;/P&gt;&lt;P&gt;[SALESORG]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;AS&lt;/B&gt; [Organizzazione commerciale],&lt;/P&gt;&lt;P&gt;makedate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(left("DATEFROM",4),mid("DATEFROM",5,2),right("DATEFROM",2)) &lt;B&gt;AS&lt;/B&gt; [Inizio validità],&lt;/P&gt;&lt;P&gt;makedate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(left("DATETO",4),mid("DATETO",5,2),right("DATETO",2)) &lt;B&gt;AS&lt;/B&gt; [Fine validità],&lt;/P&gt;&lt;P&gt;[TXTLG]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;AS&lt;/B&gt; "Campagna di vendita (descr.)";&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;SQL&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;SELECT&lt;/B&gt;&lt;/P&gt;&lt;P&gt;"SALESDEAL",&lt;/P&gt;&lt;P&gt;"COMP_CODE",&lt;/P&gt;&lt;P&gt;"DISTR_CHAN",&lt;/P&gt;&lt;P&gt;"SALESORG",&lt;/P&gt;&lt;P&gt;"DATEFROM",&lt;/P&gt;&lt;P&gt;"DATETO"&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= 'A';&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;INNER&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;JOIN&lt;/B&gt; &lt;B&gt;SELECT&lt;/B&gt; &lt;P&gt;"SALESDEAL",&lt;/P&gt;&lt;P&gt;"TXTLG"&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;SAPBWP."/BI0/TSALESDEAL"; SAPBWP."/BI0/PSALESDEAL" &lt;P&gt;WHERE"OBJVERS"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; [SALESDEAL],&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Sorry I can't test it myself...&lt;/P&gt;&lt;P&gt;I've appended the test-qvw with that option. What Happens if you do it this way?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Helmut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 09:58:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237238#M88324</guid>
      <dc:creator />
      <dc:date>2010-08-18T09:58:46Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Re: AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237239#M88325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helmut, first of all thanks for contributing to this post. It's very userful when the discussion leads to knowledge share.&lt;/P&gt;&lt;P&gt;I tried your code and actually it seems that it doesnt do a second turn loading the disired data but I think that, although not evidently, the system does it because run time remains the same. So I can just say I can put in a different way the code but without any performance gain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alberto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;P.S.Please follow the instructions suggested in this post in order to correctly add code to a post&lt;A href="http://community.qlik.com/forums/p/15789/61380.aspx" target="_blank"&gt;http://community.qlik.com/forums/p/15789/61380.aspx&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 13:58:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237239#M88325</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-08-18T13:58:43Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Re: AW:Re: AW:Re: AW:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237240#M88326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;run time remains the same because the system has to do the same things but the data is not put into an internal table at first rather beeing evaluated "in one sweep". But you don't have to use the temporary table - let this do QV for you.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Helmut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 14:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237240#M88326</guid>
      <dc:creator />
      <dc:date>2010-08-18T14:14:28Z</dc:date>
    </item>
    <item>
      <title>SV:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237241#M88327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't just use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(date#(DATEFROM,'YYYYMMDD'),'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[Campagna di vendita (temp)]:&lt;BR /&gt;SQL SELECT&lt;BR /&gt; "SALESDEAL",&lt;BR /&gt; "COMP_CODE",&lt;BR /&gt; "DISTR_CHAN",&lt;BR /&gt; "SALESORG",&lt;BR /&gt; "DATEFROM",&lt;BR /&gt; "DATETO"&lt;BR /&gt; FROM SAPBWP."/BI0/PSALESDEAL"&lt;BR /&gt; WHERE&lt;BR /&gt; "OBJVERS" = 'A';&lt;BR /&gt;INNER JOIN SELECT&lt;BR /&gt; "SALESDEAL",&lt;BR /&gt; "TXTLG"&lt;BR /&gt; FROM SAPBWP."/BI0/TSALESDEAL";&lt;BR /&gt;&lt;BR /&gt;[Campagna di vendita]:&lt;BR /&gt;LOAD&lt;BR /&gt; [SALESDEAL] AS [Campagna di vendita],&lt;BR /&gt; [COMP_CODE] AS [Società],&lt;BR /&gt; [DISTR_CHAN] AS [Canale di distribuzione],&lt;BR /&gt; [SALESORG] AS [Organizzazione commerciale],&lt;BR /&gt; date(date#(DATEFROM,'YYYYMMDD'),'DD/MM/YYYY') as [Inizio validità],,&lt;BR /&gt; //makedate(left("DATEFROM",4),mid("DATEFROM",5,2),right("DATEFROM",2)) AS [Inizio validità],&lt;BR /&gt; makedate(left("DATETO",4),mid("DATETO",5,2),right("DATETO",2)) AS [Fine validità],&lt;BR /&gt; [TXTLG] AS "Campagna di vendita (descr.)"&lt;BR /&gt;RESIDENT [Campagna di vendita (temp)];&lt;BR /&gt;&lt;BR /&gt;STORE [Campagna di vendita] INTO VEN_BW_IOB_Campagna di vendita.qvd;&lt;BR /&gt;DROP TABLE [Campagna di vendita (temp)];&lt;BR /&gt;DROP TABLE [Campagna di vendita];&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 13:05:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237241#M88327</guid>
      <dc:creator />
      <dc:date>2010-08-19T13:05:26Z</dc:date>
    </item>
    <item>
      <title>SV:Formatting date fields coming from SAP-BWP</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237242#M88328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Max, that's for sure a way to correctly format the the date but it doesn't avoid a second cycle to be done.&lt;/P&gt;&lt;P&gt;My goal it's not only to find another way to correctly format a date field, it's rather to avoid to charge data twice, explicitly or implicitly. You do it explicitly when running the original posted code as it is; you do it implicitly if you run the code as Helmut suggests to modify it.&lt;/P&gt;&lt;P&gt;I think the only way to reach the goal is to use the right DB2 instruction, maybe finding the way to extract the date as a number.&lt;/P&gt;&lt;P&gt;I'm still trying and I'll let you know all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alberto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 14:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-date-fields-coming-from-SAP-BWP/m-p/237242#M88328</guid>
      <dc:creator>googel84</dc:creator>
      <dc:date>2010-08-19T14:42:14Z</dc:date>
    </item>
  </channel>
</rss>

