- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Unable to convert date to a particular format
Created ‎08-10-2022 04:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, please kindly help. i am trying to convert a datetime(attribute) from one format to the other but it keeps giving me empty value on the attribute:
SCENERIO:
Flowfile is json----->extract date from Json flowfile using Evaluatejsonpath---->format date using Updateattribute
Actual Date: "2022-08-01 00:00:00.0"
Desired date: "01/08/2022 00:00:00.000000"
I have tried to use this on the updateattribute, but it is not working:
${DATE_TIME:toNumber():toDate('yyyy-MM-dd hh:mm:ss.S'):format('dd/MM/yyyy HH:mm:ss.SSSSSS')}
Thank you.
Created ‎08-11-2022 03:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
${DATE_TIME:toDate('yyyy-MM-dd HH:mm:ss.SSSSSSSSS'):format('dd/MM/yyyy HH:mm:ss.SSSSSS')}
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created ‎08-11-2022 03:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
${DATE_TIME:toDate('yyyy-MM-dd HH:mm:ss.SSSSSSSSS'):format('dd/MM/yyyy HH:mm:ss.SSSSSS')}
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created ‎08-11-2022 05:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you sir. It works.
