Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Converting timestamp in NIFI

New Contributor

I need to convert timestamp value coming in flowfile of  cst/cdt  time or anytime to UTC in nifi . But I am unable to convert it is not working. Can anybody help on this


Super Collaborator

Expert Contributor


What is the format of the record you are trying to convert? What is the data type of the field you are trying to convert? Are you trying to modify the value of a record or the value of an attribute?

If you are trying to update the values from within each record, you should try using an UpdateRecord processor, in which you define a Record Writer and a Record Reader. Next, you can add another property in your processor and define it like:
Property: /your_column --> pay attention to the slash in front as it is very important.

Value: ${field.value:multiply(1000):toNumber():toDate("yyyyMMdd", "GMT"):format("yyyyMMdd")} --> this is just an example, as I do not know how your data looks like and how you want it displayed. You can use NiFi's EL to define the exact format you required, but make sure you use field.value if you want to modify the value from within that specific column.

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