<?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: Date is not parsed as expected in Csv Reader Processor in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Date-is-not-parsed-as-expected-in-Csv-Reader-Processor/m-p/292721#M216274</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/76066"&gt;@Savi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you only need one date format in your nifi expression language. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, it seems you know what format it is upstream (source), and what it needs to be for downstream. &amp;nbsp; Based on your expression need, &amp;nbsp;you should play the flow up to the csv reader processor and then List Queue on the FlowFiles and inspect the attributes. &amp;nbsp;Adjust the expression, and retest until the attribute format meets the required format. &amp;nbsp; &amp;nbsp;Inspecting the dates upstream won't show you what the date looks like after expression and before the reader. &amp;nbsp; Often times I find myself testing a flow step by step, each step confirming the attributes needed are correct for the next step. &amp;nbsp;Never moving forward to the next step until I am sure the attributes are correct after visual inspection.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Mar 2020 13:01:20 GMT</pubDate>
    <dc:creator>stevenmatison</dc:creator>
    <dc:date>2020-03-27T13:01:20Z</dc:date>
    <item>
      <title>Date is not parsed as expected in Csv Reader Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Date-is-not-parsed-as-expected-in-Csv-Reader-Processor/m-p/292694#M216258</link>
      <description>&lt;P&gt;I have a pipeline where input source is GetFile , reading csv files ,updating date format using UpdateRecord and then saving in my sql database. Configuration to update time format is :property=&amp;gt;${field.value:toDate("mm/dd/yyyy hh:mm:ss"):format("YYYY-MM-DD HH:mm:ss")}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem is I am getting date parsing exception at Update Record and date value read by CSV reader is&amp;nbsp;4/5/2019 0:00. Getting : Cannot parse attribute value as a date; date format: mm/dd/yyyy hh:mm:ss; attribute value: 4/5/2019 0:00&lt;/P&gt;&lt;P&gt;However when i open csv in excel , i get the date as&amp;nbsp;4/5/2019 12:00:00 AM , but in Notepad++ it is&amp;nbsp;4/5/2019 0:00. I am confused now where exactly the problem is with csv reader or updateRecord configuration.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 06:48:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Date-is-not-parsed-as-expected-in-Csv-Reader-Processor/m-p/292694#M216258</guid>
      <dc:creator>Savi</dc:creator>
      <dc:date>2020-03-27T06:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date is not parsed as expected in Csv Reader Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Date-is-not-parsed-as-expected-in-Csv-Reader-Processor/m-p/292721#M216274</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/76066"&gt;@Savi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you only need one date format in your nifi expression language. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, it seems you know what format it is upstream (source), and what it needs to be for downstream. &amp;nbsp; Based on your expression need, &amp;nbsp;you should play the flow up to the csv reader processor and then List Queue on the FlowFiles and inspect the attributes. &amp;nbsp;Adjust the expression, and retest until the attribute format meets the required format. &amp;nbsp; &amp;nbsp;Inspecting the dates upstream won't show you what the date looks like after expression and before the reader. &amp;nbsp; Often times I find myself testing a flow step by step, each step confirming the attributes needed are correct for the next step. &amp;nbsp;Never moving forward to the next step until I am sure the attributes are correct after visual inspection.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 13:01:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Date-is-not-parsed-as-expected-in-Csv-Reader-Processor/m-p/292721#M216274</guid>
      <dc:creator>stevenmatison</dc:creator>
      <dc:date>2020-03-27T13:01:20Z</dc:date>
    </item>
  </channel>
</rss>

