<?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: After one acquisition I've realized that dates in source SQL tables is, for unknown reason to me, stored as integer using this strange format. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428188#M1225440</link>
    <description>&lt;P&gt;124 in 1240307 might be a year if that ERP system uses a RDBMS where 1.1.1900 is the first year.&lt;/P&gt;
&lt;P&gt;In that case, 1900 +124 = 2024 and then maybe there is a simpler and faster way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, I would dare to state there is no simpler way to the one I have come up to.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 10:40:02 GMT</pubDate>
    <dc:creator>NenadV</dc:creator>
    <dc:date>2024-03-07T10:40:02Z</dc:date>
    <item>
      <title>Is there a simpler and faster way to transform dates stored as integers to dates?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2427922#M1225430</link>
      <description>&lt;P&gt;After one acquisition I've realized that dates in source SQL tables is, for unknown reason to me, stored as integer using this strange format.&lt;/P&gt;
&lt;P&gt;For exmple: 1240305 --&amp;gt;2024-03-05 (YYYY-MM-DD)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I've found a&amp;nbsp; way:&lt;/P&gt;
&lt;P&gt;tmpInvoices:&lt;/P&gt;
&lt;P&gt;load *,&lt;/P&gt;
&lt;P&gt;date(date#(tmpInvDate, 'YYYY-MM-DD')) as InvDate;&lt;/P&gt;
&lt;P&gt;sql select cast(concat('20', substring(ltrim(str(DTIN65)),2,2), substring(ltrim(str(DTIN65)),4,2),right(ltrim(str(DTIN65)),2)) as date) tmpInvDate&lt;/P&gt;
&lt;P&gt;from Invoices;&lt;/P&gt;
&lt;P&gt;but some times, again for unknow reason to me it ends with this error message:&lt;/P&gt;
&lt;P&gt;Msg 241, Level 16, State 1, Line 1&lt;BR /&gt;Conversion failed when converting date and/or time from character string.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 10:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2427922#M1225430</guid>
      <dc:creator>NenadV</dc:creator>
      <dc:date>2024-03-07T10:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: After one acquisition I've realized that dates in source SQL tables is, for unknown reason to me, stored as integer using this strange format.</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2427944#M1225431</link>
      <description>&lt;P&gt;Did you already review this old post:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/SQL-DateTime-conversion-failing/td-p/607474" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Dev/SQL-DateTime-conversion-failing/td-p/607474&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 18:56:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2427944#M1225431</guid>
      <dc:creator>David_Friend</dc:creator>
      <dc:date>2024-03-06T18:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: After one acquisition I've realized that dates in source SQL tables is, for unknown reason to me, stored as integer using this strange format.</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428152#M1225436</link>
      <description>&lt;P&gt;Thanks David. I did it now, but as expected it doesn't work well because of this strange and illogical field type used (int instead of date)&lt;/P&gt;
&lt;P&gt;You have maybe overseen the example I gave.&lt;/P&gt;
&lt;P&gt;Original and unexpected value stored in the table is 1&lt;SPAN&gt;240305 an it should be transformed to 2024-03-05 (YYYY-MM-DD).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 09:34:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428152#M1225436</guid>
      <dc:creator>NenadV</dc:creator>
      <dc:date>2024-03-07T09:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: After one acquisition I've realized that dates in source SQL tables is, for unknown reason to me, stored as integer using this strange format.</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428168#M1225437</link>
      <description>&lt;P&gt;Especially if you applies a preceding load to transform data you don't need to apply any transformation within the sql - just pull the data purely and then adjust them in Qlik.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 10:06:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428168#M1225437</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-03-07T10:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: After one acquisition I've realized that dates in source SQL tables is, for unknown reason to me, stored as integer using this strange format.</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428172#M1225438</link>
      <description>&lt;P&gt;Thanks Marcus. that was the original question "Is there&amp;nbsp; a simpler way to transform those values stored as integers to dates?"&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 10:14:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428172#M1225438</guid>
      <dc:creator>NenadV</dc:creator>
      <dc:date>2024-03-07T10:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: After one acquisition I've realized that dates in source SQL tables is, for unknown reason to me, stored as integer using this strange format.</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428181#M1225439</link>
      <description>&lt;P&gt;As far as the origin data have a common date structure they could be converted per date#(). It might be necessary to adjust the interpretation variables for it respectively to apply a changed version but in most cases it's not necessary and you may directly use:&lt;/P&gt;
&lt;P&gt;date(date#(240305, 'YYMMDD'))&lt;/P&gt;
&lt;P&gt;If there are various types of dates it might be wrapped by an alt() function to apply multiple different conversions.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 10:29:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428181#M1225439</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-03-07T10:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: After one acquisition I've realized that dates in source SQL tables is, for unknown reason to me, stored as integer using this strange format.</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428188#M1225440</link>
      <description>&lt;P&gt;124 in 1240307 might be a year if that ERP system uses a RDBMS where 1.1.1900 is the first year.&lt;/P&gt;
&lt;P&gt;In that case, 1900 +124 = 2024 and then maybe there is a simpler and faster way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, I would dare to state there is no simpler way to the one I have come up to.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 10:40:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428188#M1225440</guid>
      <dc:creator>NenadV</dc:creator>
      <dc:date>2024-03-07T10:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: After one acquisition I've realized that dates in source SQL tables is, for unknown reason to me, stored as integer using this strange format.</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428220#M1225441</link>
      <description>&lt;P&gt;Such logic could be easily adjusted, like:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;date(date#(1240307 + 19000000, 'YYYYMMDD'))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 11:06:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428220#M1225441</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-03-07T11:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simpler and faster way to transform dates stored as integers to dates?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428243#M1225442</link>
      <description>&lt;P&gt;Brilliant! Thank you Marcus.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 11:58:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-simpler-and-faster-way-to-transform-dates-stored-as/m-p/2428243#M1225442</guid>
      <dc:creator>NenadV</dc:creator>
      <dc:date>2024-03-07T11:58:56Z</dc:date>
    </item>
  </channel>
</rss>

