<?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: Loading data from excel into QV: how to transform date/numeric in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780457#M717542</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/132225"&gt;@gustavofred&lt;/a&gt;&amp;nbsp; can yo share your sample normaly if its null the result is null (I have just tested)&lt;/P&gt;&lt;P&gt;or you can add&lt;/P&gt;&lt;P&gt;if(len(trim(Date))&amp;gt;0,Num(Week(Floor(Alt(Num(Date), Num(MakeWeekDate(subfield(Date,'-',2), subfield(Date,'-',1)))))),'00')&amp;amp;'-'&amp;amp;Year(Floor(Alt(Num(Date), Num(MakeWeekDate(subfield(Date,'-',2), subfield(Date,'-',1)))))),'') as NewDateField&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2021 09:02:40 GMT</pubDate>
    <dc:creator>Taoufiq_Zarra</dc:creator>
    <dc:date>2021-02-05T09:02:40Z</dc:date>
    <item>
      <title>Loading data from excel into QV: how to transform date/numeric</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780057#M717537</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gustavofred_0-1612422577562.png" style="width: 156px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/48471iD0B278480F68049A/image-dimensions/156x493?v=v2" width="156" height="493" role="button" title="gustavofred_0-1612422577562.png" alt="gustavofred_0-1612422577562.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hello, im getting an excel file, which i have to load into QV. In the first column i have the calendar week with the year. For some reason i also have this date in numeric format in this excel file. How would i transform the date, so all data looks the same: like 07-2021&lt;/P&gt;&lt;P&gt;my idea:&lt;/P&gt;&lt;P&gt;Date(Num(DATE_VALUES), 'MM-YYYY') as WEEK_YEAR&lt;/P&gt;&lt;P&gt;my idea works only for one part of the values.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 07:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780057#M717537</guid>
      <dc:creator>gustavofred</dc:creator>
      <dc:date>2021-02-04T07:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from excel into QV: how to transform date/numeric</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780072#M717538</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/132225"&gt;@gustavofred&lt;/a&gt;&amp;nbsp; can you elaborate&lt;/P&gt;&lt;P&gt;44256-&amp;gt;01/03/2021(DD/MM/YYYY)-&amp;gt;week 9-2021 ? and 2-2021 is Month or week 2 ?&lt;/P&gt;&lt;P&gt;how you get 07-2021 ? from those dates ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 08:36:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780072#M717538</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2021-02-04T08:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from excel into QV: how to transform date/numeric</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780131#M717539</link>
      <description>&lt;P&gt;"how you get 07-2021 ? from those dates ?"&lt;/P&gt;&lt;P&gt;thats just how i want the formatting to be, thats not an actual date. i want it to be MM-YEAR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"44256-&amp;gt;01/03/2021(DD/MM/YYYY)-&amp;gt;week 9-2021" -&amp;gt; yes i want to convert a number like 44256 into 09-2021&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;and 2-2021 is Month or week 2 ?" and i want to convert 2-2021 into 02-2021&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so everything is in the same format&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 11:36:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780131#M717539</guid>
      <dc:creator>gustavofred</dc:creator>
      <dc:date>2021-02-04T11:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from excel into QV: how to transform date/numeric</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780171#M717540</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/132225"&gt;@gustavofred&lt;/a&gt;&amp;nbsp; you can use alt funtion&lt;/P&gt;&lt;P&gt;for example to convert all to date format you can use :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Date(Floor(Alt(Num(Date), Num(MakeWeekDate(subfield(Date,'-',2), subfield(Date,'-',1))))))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or add other format like this :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Data:

load *,Num(Week(Floor(Alt(Num(Date), Num(MakeWeekDate(subfield(Date,'-',2), subfield(Date,'-',1)))))),'00')&amp;amp;'-'&amp;amp;Year(Floor(Alt(Num(Date), Num(MakeWeekDate(subfield(Date,'-',2), subfield(Date,'-',1)))))) as NewDateField inline [
Date
2-2021
44256
];
&lt;/LI-CODE&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Taoufiq_Zarra_0-1612443741923.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/48504iD203857707862339/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Taoufiq_Zarra_0-1612443741923.png" alt="Taoufiq_Zarra_0-1612443741923.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 13:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780171#M717540</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2021-02-04T13:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from excel into QV: how to transform date/numeric</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780455#M717541</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;i your code with addinal date information:&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;load *,Num(Week(Floor(Alt(Num(Date), Num(MakeWeekDate(subfield(Date,'-',2), subfield(Date,'-',1)))))),'00')&amp;amp;'-'&amp;amp;Year(Floor(Alt(Num(Date), Num(MakeWeekDate(subfield(Date,'-',2), subfield(Date,'-',1)))))) as NewDateField inline [&lt;BR /&gt;Date&lt;BR /&gt;1-2021&lt;BR /&gt;2-2021&lt;BR /&gt;3-2021&lt;BR /&gt;4-2021&lt;BR /&gt;5-2021&lt;BR /&gt;6-2021&lt;BR /&gt;7-2021&lt;BR /&gt;8-2021&lt;BR /&gt;9-2021&lt;BR /&gt;10-2021&lt;BR /&gt;11-2021&lt;BR /&gt;12-2021&lt;BR /&gt;46256&lt;BR /&gt;44256&lt;BR /&gt;45256&lt;BR /&gt;43256&lt;BR /&gt;41256&lt;BR /&gt;53256&lt;BR /&gt;40256&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you explain how im getting results for null values for the formula (red circle)?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gustavofred_0-1612515263379.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/48572iDD4C3851527B8DB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gustavofred_0-1612515263379.png" alt="gustavofred_0-1612515263379.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:16:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780455#M717541</guid>
      <dc:creator>gustavofred</dc:creator>
      <dc:date>2021-02-05T09:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from excel into QV: how to transform date/numeric</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780457#M717542</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/132225"&gt;@gustavofred&lt;/a&gt;&amp;nbsp; can yo share your sample normaly if its null the result is null (I have just tested)&lt;/P&gt;&lt;P&gt;or you can add&lt;/P&gt;&lt;P&gt;if(len(trim(Date))&amp;gt;0,Num(Week(Floor(Alt(Num(Date), Num(MakeWeekDate(subfield(Date,'-',2), subfield(Date,'-',1)))))),'00')&amp;amp;'-'&amp;amp;Year(Floor(Alt(Num(Date), Num(MakeWeekDate(subfield(Date,'-',2), subfield(Date,'-',1)))))),'') as NewDateField&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:02:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780457#M717542</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2021-02-05T09:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from excel into QV: how to transform date/numeric</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780481#M717543</link>
      <description>&lt;P&gt;its exactly the data i posted above. Thank you, the new code is working as expected. The only thing you added is, that it should define the code, if the length of our date is &amp;gt;0 right?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 10:19:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780481#M717543</guid>
      <dc:creator>gustavofred</dc:creator>
      <dc:date>2021-02-05T10:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from excel into QV: how to transform date/numeric</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780773#M949160</link>
      <description>&lt;P&gt;yes &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/132225"&gt;@gustavofred&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 07:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-excel-into-QV-how-to-transform-date-numeric/m-p/1780773#M949160</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2021-02-08T07:31:11Z</dc:date>
    </item>
  </channel>
</rss>

