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]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

NiFi - Convert Current time to GMT+10:00

avatar
Expert Contributor

Is there a way to convert use expression language to convert the current time to a specific timezone. 

 

Here is what I have currently but that's GMT not GMT+10:00.

 

${now():format("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", "GMT")}

1 ACCEPTED SOLUTION

avatar

@drewski7   You are looking for something like this,  for "yesterday":

 

${now():minus(86400000):format('MM-dd-yyyy hh:mm:ss') }

Then change 24 hours to 10 hours and add not reduce:

 

${now():plus(36000000):format('MM-dd-yyyy hh:mm:ss') }

 

Let me know if this adapts to fit your use case!

View solution in original post

1 REPLY 1

avatar

@drewski7   You are looking for something like this,  for "yesterday":

 

${now():minus(86400000):format('MM-dd-yyyy hh:mm:ss') }

Then change 24 hours to 10 hours and add not reduce:

 

${now():plus(36000000):format('MM-dd-yyyy hh:mm:ss') }

 

Let me know if this adapts to fit your use case!