<?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: Compare file last modified date with system date in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Compare-file-last-modified-date-with-system-date/m-p/2258214#M40082</link>
    <description>Timestamps in Java are internal long value (milliseconds starting from 01.01.1970). 
&lt;BR /&gt;The long value provided of the tFileProperties is such kind of long value. 
&lt;BR /&gt;You can get the long value also from any Java Date object. 
&lt;BR /&gt;The routine TalendDate.getCurrentDate() returns the current timestamp and 
&lt;BR /&gt;TalendDate.getCurrentDate().getTime() returns the mentioned long value from now. 
&lt;BR /&gt;I would translate the iteration into a flow with tIterateToFlow component, send this flow in a filter component with following filter expression: 
&lt;BR /&gt;input_flow.mtime &amp;lt; (TalendDate.getCurrentDate().getTime() - (120 * 1000))</description>
    <pubDate>Thu, 06 Dec 2012 23:02:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-12-06T23:02:16Z</dc:date>
    <item>
      <title>Compare file last modified date with system date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Compare-file-last-modified-date-with-system-date/m-p/2258213#M40081</link>
      <description>I'm reading in files and want to filter out any less that two minutes old. ie I only want to read in files whose modified date is at least 120 seconds earlier than the system date. I can get mdate and mtime_string from tFile_Properties but one is long and the other string. How can I compare either of these with the system date, which is a date?
&lt;BR /&gt;I'm starting with FileList as I will be iterating through whichever files have just arrived in a directory.
&lt;BR /&gt;I've taken a look at TalendDate.parseDate but can't work it out.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Jackie</description>
      <pubDate>Wed, 05 Dec 2012 17:53:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Compare-file-last-modified-date-with-system-date/m-p/2258213#M40081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-05T17:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Compare file last modified date with system date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Compare-file-last-modified-date-with-system-date/m-p/2258214#M40082</link>
      <description>Timestamps in Java are internal long value (milliseconds starting from 01.01.1970). 
&lt;BR /&gt;The long value provided of the tFileProperties is such kind of long value. 
&lt;BR /&gt;You can get the long value also from any Java Date object. 
&lt;BR /&gt;The routine TalendDate.getCurrentDate() returns the current timestamp and 
&lt;BR /&gt;TalendDate.getCurrentDate().getTime() returns the mentioned long value from now. 
&lt;BR /&gt;I would translate the iteration into a flow with tIterateToFlow component, send this flow in a filter component with following filter expression: 
&lt;BR /&gt;input_flow.mtime &amp;lt; (TalendDate.getCurrentDate().getTime() - (120 * 1000))</description>
      <pubDate>Thu, 06 Dec 2012 23:02:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Compare-file-last-modified-date-with-system-date/m-p/2258214#M40082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-06T23:02:16Z</dc:date>
    </item>
  </channel>
</rss>

