<?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 PICK or leave based on the timestamp. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542569#M694306</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;Can someone please help me out for the following 2 requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have number of xls which is in ExcelName_YYYYMM.xls format. I want to read all the xls in a particular folder and put a flag as picked based on the value in the variable. Imagine I have below xls in a folder and value in a variable is 4 then it will put latest 4 records as PICK and rest as OTHERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ExcelName_201212.xls&lt;/P&gt;&lt;P&gt;ExcelName_201211.xls&lt;/P&gt;&lt;P&gt;ExcelName_201210.xls&lt;/P&gt;&lt;P&gt;ExcelName_201209.xls&lt;/P&gt;&lt;P&gt;ExcelName_201208.xls&lt;/P&gt;&lt;P&gt;ExcelName_201207.xls&lt;/P&gt;&lt;P&gt;ExcelName_201206.xls&lt;/P&gt;&lt;P&gt;ExcelName_201205.xls&lt;/P&gt;&lt;P&gt;ExcelName_201204.xls&lt;/P&gt;&lt;P&gt;ExcelName_201203.xls&lt;/P&gt;&lt;P&gt;ExcelName_201202.xls&lt;/P&gt;&lt;P&gt;ExcelName_201201.xls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Required Result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ExcelName_201212.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK&lt;/P&gt;&lt;P&gt;ExcelName_201211.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK&lt;/P&gt;&lt;P&gt;ExcelName_201210.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK&lt;/P&gt;&lt;P&gt;ExcelName_201209.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK&lt;/P&gt;&lt;P&gt;ExcelName_201208.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201207.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201206.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201205.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201204.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201203.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201202.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201201.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Imagine I have log files in a folder.As you know there can be N number of log files for the same date(as the creation timestamp is different). So based on the value in the variable it should put flag as PICK and rest as OTHERS.For example if the value in the variable is 3 it should put flag as PICK for all the logs for the latest 3 dates and rest as archived. Imagine you have 5 logs for the frst date,10 for second date and 5 for third date and 200 for rest of the dates. then put flag as PICK for first 20 and rest 200 as OTHERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope my requirement is clear. If you have any questions please ask me.Hope someone can help me out on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;qvforum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logfile_20121201.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK(Put all the 5 files for this date as PICK)&lt;/P&gt;&lt;P&gt;Logfile_20121202.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK(Put all the 10 files for this date as PICK)&lt;/P&gt;&lt;P&gt;Logfile_20121203.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK(Put all the 5 files for this date as PICK)&lt;/P&gt;&lt;P&gt;Logfile_20121204.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS(Put rest of the records as OTHERS From here)&lt;/P&gt;&lt;P&gt;Logfile_20121205.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121206.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121207.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121208.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121209.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121210.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121211.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121212.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;qvforum&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jul 2013 16:56:51 GMT</pubDate>
    <dc:creator>qlikviewforum</dc:creator>
    <dc:date>2013-07-04T16:56:51Z</dc:date>
    <item>
      <title>PICK or leave based on the timestamp.</title>
      <link>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542569#M694306</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;Can someone please help me out for the following 2 requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have number of xls which is in ExcelName_YYYYMM.xls format. I want to read all the xls in a particular folder and put a flag as picked based on the value in the variable. Imagine I have below xls in a folder and value in a variable is 4 then it will put latest 4 records as PICK and rest as OTHERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ExcelName_201212.xls&lt;/P&gt;&lt;P&gt;ExcelName_201211.xls&lt;/P&gt;&lt;P&gt;ExcelName_201210.xls&lt;/P&gt;&lt;P&gt;ExcelName_201209.xls&lt;/P&gt;&lt;P&gt;ExcelName_201208.xls&lt;/P&gt;&lt;P&gt;ExcelName_201207.xls&lt;/P&gt;&lt;P&gt;ExcelName_201206.xls&lt;/P&gt;&lt;P&gt;ExcelName_201205.xls&lt;/P&gt;&lt;P&gt;ExcelName_201204.xls&lt;/P&gt;&lt;P&gt;ExcelName_201203.xls&lt;/P&gt;&lt;P&gt;ExcelName_201202.xls&lt;/P&gt;&lt;P&gt;ExcelName_201201.xls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Required Result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ExcelName_201212.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK&lt;/P&gt;&lt;P&gt;ExcelName_201211.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK&lt;/P&gt;&lt;P&gt;ExcelName_201210.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK&lt;/P&gt;&lt;P&gt;ExcelName_201209.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK&lt;/P&gt;&lt;P&gt;ExcelName_201208.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201207.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201206.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201205.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201204.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201203.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201202.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;ExcelName_201201.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Imagine I have log files in a folder.As you know there can be N number of log files for the same date(as the creation timestamp is different). So based on the value in the variable it should put flag as PICK and rest as OTHERS.For example if the value in the variable is 3 it should put flag as PICK for all the logs for the latest 3 dates and rest as archived. Imagine you have 5 logs for the frst date,10 for second date and 5 for third date and 200 for rest of the dates. then put flag as PICK for first 20 and rest 200 as OTHERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope my requirement is clear. If you have any questions please ask me.Hope someone can help me out on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;qvforum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logfile_20121201.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK(Put all the 5 files for this date as PICK)&lt;/P&gt;&lt;P&gt;Logfile_20121202.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK(Put all the 10 files for this date as PICK)&lt;/P&gt;&lt;P&gt;Logfile_20121203.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK(Put all the 5 files for this date as PICK)&lt;/P&gt;&lt;P&gt;Logfile_20121204.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS(Put rest of the records as OTHERS From here)&lt;/P&gt;&lt;P&gt;Logfile_20121205.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121206.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121207.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121208.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121209.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121210.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121211.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;Logfile_20121212.xls&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;qvforum&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 16:56:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542569#M694306</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-07-04T16:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: PICK or leave based on the timestamp.</title>
      <link>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542570#M694307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really sure if I understood what you want to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe like attached?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used some sample Excelfiles with YearMonth and date / timestamp values in the filename:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ExcelName_20120901_100800.xls&lt;/P&gt;&lt;P&gt;ExcelName_20120901_121008.xls&lt;/P&gt;&lt;P&gt;ExcelName_201210.xls&lt;/P&gt;&lt;P&gt;ExcelName_20121002_101008.xls&lt;/P&gt;&lt;P&gt;ExcelName_20121002_111232.xls&lt;/P&gt;&lt;P&gt;ExcelName_201211.xls&lt;/P&gt;&lt;P&gt;ExcelName_20121105_101008.xls&lt;/P&gt;&lt;P&gt;ExcelName_20121105_121008.xls&lt;/P&gt;&lt;P&gt;ExcelName_201212.xls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can parse these filenames and create a table of the names and add new fields to flag the latest files:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each vFile in FileList('ExcelName*.xls')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Files:&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(keepchar(BaseName,'0123456789'),'YYYYMM')) as Date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp(Timestamp#(keepchar(BaseName,'0123456789'),'YYYYMMDDhhmmss')) as Timestamp;&lt;/P&gt;&lt;P&gt;LOAD '$(vFile)' as Filename,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subfield('$(vFile)','\',-1) as BaseName&lt;/P&gt;&lt;P&gt; AutoGenerate 1;&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;Let vTop =2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;LOAD max(Date, $(vTop)) as maxDate, max(daystart(Timestamp),$(vTop)) as maxDateTimestamp Resident Files; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (Files) LOAD Date, if(Date &amp;gt;= peek('maxDate',0,'Ex'),'Keep','Other') as DateFlag Resident Files;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (Files) LOAD Timestamp, if(daystart(Timestamp) &amp;gt;= peek('maxDateTimestamp',0,'Ex'),'Keep','Other') as TimestampFlag Resident Files; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 22:25:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542570#M694307</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-04T22:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: PICK or leave based on the timestamp.</title>
      <link>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542571#M694308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I was not clear in explaining my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Excel thing only have YYYY_MM along with the filename. It will not contain minutes and even days also. So based on my variable(if value is 2) it should latest 2 as pick and rest as others. Basically I want to read the file name of xls, and put flag based on our above calculation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. This is for log file. Here we are not considerring the DateStamp which is there along with the logfile. Here will consider only the ModificationTime of file. So based of variable value we will match the date and put flag as pick and rest as others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is clear not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 03:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542571#M694308</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-07-05T03:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: PICK or leave based on the timestamp.</title>
      <link>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542572#M694309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. should already work in above sample, I just called the field Date, but actually checked for your year month in the filename. You can also use other QV string or date / time parsing functions to get the number you are interested in from the BaseName.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Ok, got it. You can use filetime() function to get the modification date when loading in a file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the script to add 2. and hopefully make the things more clear:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each vFile in FileList('ExcelName*.xls')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Files1: // reading excel files with yearmonth in filename&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(keepchar(BaseName,'0123456789'),'YYYYMM')) as YearMonthFilename; &lt;/P&gt;&lt;P&gt;LOAD '$(vFile)' as Filename,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subfield('$(vFile)','\',-1) as BaseName&lt;/P&gt;&lt;P&gt;autogenerate 1;&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;Files2: // reading your logs with mod time&lt;/P&gt;&lt;P&gt;LOAD Filetime() as TimestampMod FROM *.log (txt)&lt;/P&gt;&lt;P&gt;where recno()=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vTop =2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex1:&lt;/P&gt;&lt;P&gt;LOAD max(YearMonthFilename, $(vTop)) as maxYearMonthFilename Resident Files1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex2:&lt;/P&gt;&lt;P&gt;LOAD max(daystart(TimestampMod),$(vTop)) as maxDateTimestampMod Resident Files2; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (Files1) LOAD YearMonthFilename, if(YearMonthFilename &amp;gt;= peek('maxYearMonthFilename',0,'Ex1'),'Keep','Other') as YearMonthFilenameFlag Resident Files1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (Files2) LOAD TimestampMod, if(daystart(TimestampMod) &amp;gt;= peek('maxDateTimestampMod',0,'Ex2'),'Keep','Other') as TimestampModFlag Resident Files2; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: You probably want to add the filename also to the Files2 table. Look into the QV file system function, you can use filename() for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Files2: // reading your logs with mod time&lt;/P&gt;&lt;P&gt;LOAD FileName() as Filename2, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filetime() as TimestampMod FROM *.log (txt)&lt;/P&gt;&lt;P&gt;where recno()=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of the file filter *.log, you can use the extensions and file name patterns that you need, of course, e.g. Logfile_*.txt (txt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 05:40:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542572#M694309</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-05T05:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: PICK or leave based on the timestamp.</title>
      <link>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542573#M694310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a ton! By looking at the output looks like you have done what I was lookin for. But still I want to check it by loading data from my side. I have couple of doubts below could you please help for the same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. May I know what is the change in below For statement if all excels are @ C:\Users\Public\Downloads\Excel\ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each vFile in FileList('ExcelName*.xls')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. What will be below load statement if my log files are @ C:\Users\Public\Downloads\Log\ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Files2: // reading your logs with mod time&lt;/P&gt;&lt;P&gt;LOAD Filetime() as TimestampMod FROM *.log (txt)&lt;/P&gt;&lt;P&gt;where recno()=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I change something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. For each vFile in FileList('C:\Users\Public\Downloads\Excel\*.xls')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. May I know what need to be done for logfile???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 18:20:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542573#M694310</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-07-05T18:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: PICK or leave based on the timestamp.</title>
      <link>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542574#M694311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;For each vFile in FileList('&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;C:\Users\Public\Downloads\Excel\&lt;/SPAN&gt;ExcelName*.xls')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;should do what you want (just change the file name pattern if needed, you may also just use what you suggested, if you are interested in all excel files at this location).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Please look into the QV string functions and date / time interpretation functions if you need to parse the year month from your file name and having more complex file names than posted above.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;LOAD Filetime() as TimestampMod FROM &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;C:\Users\Public\Downloads\Log\&lt;/SPAN&gt;*.log (txt)&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;where recno()=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;should work, assuming that there log files are text files and have a file extension .log&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Otherwise change .log to whatever extension you are using (or if you use several extensions, but all files are in this location, just use the star symbol (wildcard).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Jul 2013 16:04:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542574#M694311</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-06T16:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: PICK or leave based on the timestamp.</title>
      <link>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542575#M694312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May I know the use of recno=1 in WHERE condition of the second example i,e while loading from log files?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 07:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542575#M694312</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-07-08T07:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: PICK or leave based on the timestamp.</title>
      <link>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542576#M694313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have another set of requirement which belongs to the task(Ex:1 above) which I am working on currently. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have field called "Location" in excel files which read in Ex:1(above).Once Files1 table is ready in above example with flag. I want to replace the root path in "Location" field of xls with given path.(i,e)Changing changing the root path from DEV environment to PROD environment.Once I replace the root path in above location I want either right back to the same excel and QVD.May I know how this can be achieved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think we can use "REPLACE" function to replace the path explained above.(i,e)&lt;/P&gt;&lt;P&gt;replace('Location','C:\Users\Public\Downloads\','D:\Users\Public\Downloads\') as New_Location&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before using Replace:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Location:&lt;/P&gt;&lt;P&gt;C:\Users\Public\Downloads\Excel\&lt;/P&gt;&lt;P&gt;C:\Users\Public\Downloads\xyz\&lt;/P&gt;&lt;P&gt;C:\Users\Public\Downloads\abc\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After using Replace:&lt;/P&gt;&lt;P&gt;Location:&lt;/P&gt;&lt;P&gt;D:\Users\Public\Downloads\Excel\&lt;/P&gt;&lt;P&gt;D:\Users\Public\Downloads\xyz\&lt;/P&gt;&lt;P&gt;D:\Users\Public\Downloads\abc\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So may I know how this can be achieved at Excel level and QVD level. Is there is anyway we can replace the location as explained above and save the same in Excel and QVD.I know it should be possible QVD level, but not sure how that can be achieved. Can you please how this can be achived at QVD level and also at Excel level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;qvforum&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 17:46:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PICK-or-leave-based-on-the-timestamp/m-p/542576#M694313</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-07-09T17:46:45Z</dc:date>
    </item>
  </channel>
</rss>

