Created 07-11-2016 10:04 AM
Hi everyone,
I'm trying to change this kind of timestamp: "2016-07-06T15:04:33.332+00:00" to this "2016/07/06" with apache Nifi,
i have tried many things but failed miserably.
This is my configuration of the ReplaceText processor
Search Value = ${dbbf.timestamp_da}
Replacement Value = ${bddf.timestamp_da:toDate("yyyy-MM-dd'T'HH:mm:ss.SSSZ"):format('yyyy/MM/dd')}
Character Set = UTF-8 Maximum
Buffer Size = 1 MB
Replacement Strategy = Literal
Replace Evaluation Mode = Entire text
If Anyone can help i would really appreciate, Thanks in advance 🙂
Created 07-25-2016 07:41 AM
I appreciate the help and thank you for that. I have found the format of the timestamp which is "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" it was a lot easier after that.
Created 07-11-2016 03:02 PM
One idea is to try an executeprocess and pass the raw date into a shell command like this:
echo "2016-07-06T15:04:33.332+00:00" | awk -F"T" '{print $1}' | sed 's/-/\//g'
produces the format "2016/07/06"
Created 07-25-2016 07:41 AM
I appreciate the help and thank you for that. I have found the format of the timestamp which is "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" it was a lot easier after that.