I am using the now() function to add a dynamic attribute to the flow. The value that's assigned to the attribute is human-readable format. I would like to get the value in the ISO format:
2019-09-21T12:00:00Z
I have tried this expression:
${now():format("yyyy-MM-ddTHH:mm:ss.SSS'Z'")}
However, I am getting an error on 'T'.
ERROR: failed to process session due to Illegal pattern character 'T';
Is there a quick way to format the date using the EL?
I am NiFi version 1.9.1
Thanks
According to the documentation,
${now():format("yyyy-MM-dd'T'HH:mm:ss'Z'", "GMT")}
will give your expected result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With