Support Questions
Find answers, ask questions, and share your expertise

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.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.