Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Change timestamp format micro to millis on NiFi

avatar
Explorer

I get a file with multiple dates in the following format: 2021-08-25T12:34:48.984704 which is in micro format. How could I change these dates on the nifi to stay in millis? I tried the following: Apache Nifi Expression Language - toDate formatting formatting but I was not successful in the configuration. I believe that the answer is cohort, but I am not managing to make it work.

1 ACCEPTED SOLUTION

avatar
Explorer

I managed to solve it, I used ${field.value:substring(0,23):toDate("yyyy-MM-dd'T'HH:mm:ss.SSS"):format("yyyy-MM-dd HH:mm: ss.SSS")}

View solution in original post

1 REPLY 1

avatar
Explorer

I managed to solve it, I used ${field.value:substring(0,23):toDate("yyyy-MM-dd'T'HH:mm:ss.SSS"):format("yyyy-MM-dd HH:mm: ss.SSS")}