<?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: How to Convert 7 or 8 character numeric string to date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-Convert-7-or-8-character-numeric-string-to-date/m-p/1406774#M816892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Andrew, your solution works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For those that may be reading along I did remove the text "&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; (as text string)" &lt;/SPAN&gt; to get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wouldn't of been able to come up with that one myself. This will help me read correctly the 10 or other date fields in my data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Aug 2017 23:02:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-30T23:02:00Z</dc:date>
    <item>
      <title>How to Convert 7 or 8 character numeric string to date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Convert-7-or-8-character-numeric-string-to-date/m-p/1406772#M816890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully the Qlik Community can assist me. I am attempting to load from a *.csv file a series of dates formatted as a text string. The text string varies in length between either a 7 or 8 character string which is either DMMYYYY (7 character string) or DDMMYYYY (8 character string).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the load statement I would like to have these text string converted to the date format DD-MM-YYYY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example my data looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="199" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#000000&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid #000000; width: 633px; height: 185px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px; font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;Date_of_birth (as text string)&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px; font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;Wanted Date Format&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;John Smith&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;1101983&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;01/01/1983&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Dee White&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;27121975&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;27/12/1975&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Marg All&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;16062001&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;16/06/2001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Win Cooper&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;9102012&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;09/10/2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Sam Mac&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;7072007&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;07/07/2007&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Wanda McT&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;5091962&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;05/09/1962&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Steve Rudd&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;21021964&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;21/02/1964&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Tim Jurd&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;18011938&lt;/TD&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left;"&gt;18/01/1938&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I accomplish this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have tried combinations of several statements including:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;IF&lt;/SPAN&gt; (&lt;SPAN style="color: #0000ff;"&gt;LEN&lt;/SPAN&gt;(Date_of_birth]) = 7, '0' &amp;amp; Date_of_birth, Date_of_birth) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; Date_of birth,&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;this worked to make the 7 character string to an 8 character string&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Also I tried converting to date using &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Date#&lt;/SPAN&gt; ([Date of birth],'DDMMYYYY'), 'DD-MM-YYYY') &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; [Date of birth], &lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;but this gives me incorrect dates, for example 7 character string 2111934 gives me 21-11-0934, where I am expecting 02/11/1934. While 8 character string 15121991 is interpreted correctly as 15-12-1991.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Convert-7-or-8-character-numeric-string-to-date/m-p/1406772#M816890</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to Convert 7 or 8 character numeric string to date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Convert-7-or-8-character-numeric-string-to-date/m-p/1406773#M816891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Date#(Right('0' &amp;amp;[Date_of_birth (as text string)],8),'DDMMYYYY'),'DD/MM/YYYY') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in a chart or in script as you prefer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;giving&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Date_of_birth (as text string)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Date(Date#(Right('0' &amp;amp;[Date_of_birth (as text string)],8),'DDMMYYYY'),'DD/MM/YYYY') &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1101983&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;01/10/1983&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;5091962&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;05/09/1962&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;7072007&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;07/07/2007&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;9102012&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;09/10/2012&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;16062001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;16/06/2001&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;18011938&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;18/01/1938&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;21021964&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;21/02/1964&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;27121975&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;27/12/1975&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 15:36:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Convert-7-or-8-character-numeric-string-to-date/m-p/1406773#M816891</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-08-30T15:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Convert 7 or 8 character numeric string to date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Convert-7-or-8-character-numeric-string-to-date/m-p/1406774#M816892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Andrew, your solution works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For those that may be reading along I did remove the text "&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; (as text string)" &lt;/SPAN&gt; to get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wouldn't of been able to come up with that one myself. This will help me read correctly the 10 or other date fields in my data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 23:02:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Convert-7-or-8-character-numeric-string-to-date/m-p/1406774#M816892</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-30T23:02:00Z</dc:date>
    </item>
  </channel>
</rss>

