- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Change timestamp format micro to millis on NiFi
- Labels:
-
Apache NiFi
Created ‎12-13-2021 12:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎12-15-2021 05:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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")}
Created ‎12-15-2021 05:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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")}
