@Virt_Apatt
let me add some clarity to my last response with some example NiFi Expression Language (NEL) statements:
NiFi attributes are stored as strings. In some cases NiFi will infer a number when it can, but when it comes to dates that is not possible. So when you create a FlowFile attribute with date string you'll need to convert to a date type before you can add you 10 days in milliseconds to it.
Below is a NEL statement that you can enter your custom date into do the complete conversion in one step with out needing to pass the custom date in to the NEL from a FlowFile Attribute.
${literal('2023-01-15 10:30:00'):toDate('yyyy-MM-dd hh:mm:ss'):plus(864000000):format('yyyyMMddHHmmss')}
Here is NEL statement where custom-Date comes from a pre-existing attribute on the FlowFile. This one allows you to get your initial "Custom Date" from a FlowFile attribute added to your FlowFile at some point upstream in your dataflow (pulling from some source, from some distributed cache, etc). This eliminates the need for the extra UpdateAttribute processor.
${'Custom Date':toDate('yyyy-MM-dd hh:mm:ss'):plus(864000000):format('yyyyMMddHHmmss')}
Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt