<?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: Problem extracting header as date from .dbf file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-extracting-header-as-date-from-dbf-file/m-p/470416#M697134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;For each vFile in FileList('y:\CONTABILITATE\Detaliutichete*.dbf')&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Load &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;date(date#(num(right(FileBaseName(), len(FileBaseName())-14),'000000'),'MMDDYY')) as NewDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;[$(vFile)]&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; (ooxml, embedded labels, table is Sheet1);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;NEXT vFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Feb 2013 12:45:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-26T12:45:55Z</dc:date>
    <item>
      <title>Problem extracting header as date from .dbf file</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-extracting-header-as-date-from-dbf-file/m-p/470415#M697133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to extract data from .dbf files, files that are stored on 44 distinct servers.&lt;/P&gt;&lt;P&gt;On each server, the tables are like "Detaliutichete12009" or "detaliutichete102009". What i need to do is to extract the header of the table and transform it into a date format that will be put into a new table as column "Date".&lt;/P&gt;&lt;P&gt;I have written a script that does this correct for some Excel files that I have on my local computer. The issue is that when I try to execute the script for the .dbf files that are stored on the server, it doesn't load me anything.&lt;/P&gt;&lt;P&gt;Instead, I receive an error message saying "bad zip file", even though there is no zip file in that location.&lt;/P&gt;&lt;P&gt;The code I'm trying to use to extract the date from the .dbf file is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each vFile in FileList('y:\CONTABILITATE\Detaliutichete*.dbf')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;if(left(right(filebasename(),6),1), 1, 0) as first digit,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; left(right(filebasename(),5),1) as second digit,&lt;/P&gt;&lt;P&gt;&amp;nbsp; date(date#(right(filebasename(),4), 'YYYY'),'YYYY') as year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;from &lt;Y&gt;&lt;/Y&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT vFile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 09:07:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-extracting-header-as-date-from-dbf-file/m-p/470415#M697133</guid>
      <dc:creator />
      <dc:date>2013-02-26T09:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem extracting header as date from .dbf file</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-extracting-header-as-date-from-dbf-file/m-p/470416#M697134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;For each vFile in FileList('y:\CONTABILITATE\Detaliutichete*.dbf')&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Load &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;date(date#(num(right(FileBaseName(), len(FileBaseName())-14),'000000'),'MMDDYY')) as NewDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;[$(vFile)]&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; (ooxml, embedded labels, table is Sheet1);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;NEXT vFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 12:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-extracting-header-as-date-from-dbf-file/m-p/470416#M697134</guid>
      <dc:creator />
      <dc:date>2013-02-26T12:45:55Z</dc:date>
    </item>
  </channel>
</rss>

