Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 09-05-2017 03:39 AM
I have an datetime attribute which looks something like this "2017-08-29T00:00:15.4945" which comes from a JSON file.
In my PutHDFS when I am trying to put files into a file structure I am trying to get Year/Month/Day.
My Directory: /data/events/${datetime:toDate("YYYY-MM-dd'T'HH:mm:ss.SSSS", "NZDT"):format("YYYY/MM/dd")}
This is nearly working but is putting 2017/01/01 but it should be 2017/08/29.
Thanks,
Brendan
Created 09-06-2017 03:58 AM
Hi @Brendan Smith,
i'm using NiFi-1.1 and tried with the same datetime attribute as you have mentioned above.
The below expression is working perfectly fine for me.
/data/events/${date:toDate("yyyy-MM-dd'T'HH:mm:ss.SSSS"):format("yyyy-MM-dd")}output:- drwxr-xr-x - nifi hdfs 0 2017-09-05 23:24 /data/events/2017-08-29
Created 09-06-2017 03:58 AM
Hi @Brendan Smith,
i'm using NiFi-1.1 and tried with the same datetime attribute as you have mentioned above.
The below expression is working perfectly fine for me.
/data/events/${date:toDate("yyyy-MM-dd'T'HH:mm:ss.SSSS"):format("yyyy-MM-dd")}output:- drwxr-xr-x - nifi hdfs 0 2017-09-05 23:24 /data/events/2017-08-29
Created 09-06-2017 04:16 AM
Interesting I copied what you had and it now works :O.
It looks like the difference in lower case and upper case is the difference here.
Thanks!
Created 02-15-2019 10:52 AM
Hi i have to convert twitter date to solr type: https://lucene.apache.org/solr/guide/7_6/working-with-dates.html can someone help me?