Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

How to convert "file.creationtime" to timestamp format?

Explorer

Is there some way to convert "file.creationtime" format to timestamp format?

Like below:

110246-1565319679857.png to 110286-1565319711365.png




1 REPLY 1

Super Guru

@Raymond Cui

Try with adding new attribute in UpdateAttribute processor as


epochtime

${file.creationTime:toDate("yyyy-MM-dd'T'HH:mm:ss+0000"):toNumber()}

Then nifi will match the format and convert to epoch time.