- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
NiFi - Convert Current time to GMT+10:00
- Labels:
-
Apache NiFi
Created 06-01-2023 11:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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")}
Created 06-01-2023 12:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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!
Created 06-01-2023 12:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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!
