<?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>question Re: Adding timestamp to the file name before extension in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Adding-timestamp-to-the-file-name-before-extension/m-p/279807#M208472</link>
    <description>&lt;LI-CODE lang="markup"&gt;${filename:substringBeforeLast(‘.’)}_${now():format("yyyy-MM-dd-HH-mm-ss")}.${filename:substringAfter('.')}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This expression worked fine. Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2019 17:25:34 GMT</pubDate>
    <dc:creator>girish6</dc:creator>
    <dc:date>2019-10-09T17:25:34Z</dc:date>
    <item>
      <title>Adding timestamp to the file name before extension</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Adding-timestamp-to-the-file-name-before-extension/m-p/279803#M208470</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;I want to rename/modify the filename of the flowfile with the timestamp added to it. Let's say the original flowfile name is file1.txt, I want to change the name of file to be file1_&amp;lt;timestamp&amp;gt;.txt. I used updateAttribute processor to do it. The expression which I gave is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;${filename:substringBeforeLast(‘.’)}_${now():format("yyyy-MM-dd HH:mm:ss.SSS’Z’”)}.${filename:substringAfter('.')}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Giving me error. I'm bad at Expression language. could anyone help me in this?&lt;BR /&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 04:52:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Adding-timestamp-to-the-file-name-before-extension/m-p/279803#M208470</guid>
      <dc:creator>girish6</dc:creator>
      <dc:date>2019-10-10T04:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding timestamp to the file name before extension</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Adding-timestamp-to-the-file-name-before-extension/m-p/279807#M208472</link>
      <description>&lt;LI-CODE lang="markup"&gt;${filename:substringBeforeLast(‘.’)}_${now():format("yyyy-MM-dd-HH-mm-ss")}.${filename:substringAfter('.')}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This expression worked fine. Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 17:25:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Adding-timestamp-to-the-file-name-before-extension/m-p/279807#M208472</guid>
      <dc:creator>girish6</dc:creator>
      <dc:date>2019-10-09T17:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding timestamp to the file name before extension</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Adding-timestamp-to-the-file-name-before-extension/m-p/279910#M208531</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70164"&gt;@girish6&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your first EL statement would work as well once you correct the single quote marks around the Z.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many outside text editors end up messing up the single quotes, so the NiFi EL ends up being incorrect when you copy/paste.&lt;BR /&gt;&lt;BR /&gt;NiFi's EL editor built in to the processor property text blocks can help identify when the EL format is wrong.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-10-10 at 1.10.31 PM.png" style="width: 500px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/24899i6B18B8696FCAD238/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-10-10 at 1.10.31 PM.png" alt="Screen Shot 2019-10-10 at 1.10.31 PM.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In above you can see your NiFi EL statement as copied and pasted on line 3. You'll notice the color coding indicates an issue with the function's input parameters.&lt;BR /&gt;Line 1 has the properly formatted version of that same NiFi EL statement.&lt;BR /&gt;&lt;BR /&gt;Be careful when using copy paste from some external editors.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Matt&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 17:15:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Adding-timestamp-to-the-file-name-before-extension/m-p/279910#M208531</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-10-10T17:15:02Z</dc:date>
    </item>
  </channel>
</rss>

