- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Date plus one day with update attribute
- Labels:
-
Apache NiFi
Created ‎08-17-2022 06:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey everyone,
I want to make an API request for every single day in a period.
I have defined a start date and an end date in the Generate Flow File Procesor
the api structure is as follows
https://example.com/interfaces?session=${SessionId}&date_start=${since}&date_end=${since}
and now I want to loop with route on attribute and update attribute to request all days in this time period.
now the question how can I, the attribute of the start date always increase by one day. with the following expression in the update attribute processore I get an empty field as result
${since:toNumber():plus(86400000):format('yyyy-MM-dd')}
Result
Does anyone have an idea what adjusted we
Created ‎08-17-2022 07:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try the following Expression:
${since:toDate('yyyy-MM-dd'):toNumber():plus(86400000):format('yyyy-MM-dd')}
If you find this helpful please accept solution. Thanks
Created ‎08-17-2022 07:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try the following Expression:
${since:toDate('yyyy-MM-dd'):toNumber():plus(86400000):format('yyyy-MM-dd')}
If you find this helpful please accept solution. Thanks
Created ‎08-17-2022 11:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for your support. The conversion to a date form type I had not in mind
