You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Igor Kravzov <ig...@gmail.com> on 2016/06/29 19:37:54 UTC

Convert tweet time to different date/time format

How can I convert tweet date/time stamp in format "Wed Jun 29 19:04:20
+0000 2016" to this format "2016-06-29 15:04:41" using date functions?

Thanks in advance.

Re: Convert tweet time to different date/time format

Posted by Igor Kravzov <ig...@gmail.com>.
Thanks you very much.

On Wed, Jun 29, 2016 at 3:45 PM, Mark Payne <ma...@hotmail.com> wrote:

> Igor,
>
> You can use the toDate() and format() functions:
>
> ${tweetTimestamp:toDate('EEE MMM dd HH:mm:ss Z yyyy'):format('yyyy-MM-dd
> HH:mm:ss')}
>
> Thanks
> -Mark
>
>
>
> On Jun 29, 2016, at 3:37 PM, Igor Kravzov <ig...@gmail.com> wrote:
>
> How can I convert tweet date/time stamp in format "Wed Jun 29 19:04:20
> +0000 2016" to this format "2016-06-29 15:04:41" using date functions?
>
> Thanks in advance.
>
>
>

Re: Convert tweet time to different date/time format

Posted by Mark Payne <ma...@hotmail.com>.
Igor,

You can use the toDate() and format() functions:

${tweetTimestamp:toDate('EEE MMM dd HH:mm:ss Z yyyy'):format('yyyy-MM-dd HH:mm:ss')}

Thanks
-Mark



> On Jun 29, 2016, at 3:37 PM, Igor Kravzov <ig...@gmail.com> wrote:
> 
> How can I convert tweet date/time stamp in format "Wed Jun 29 19:04:20 +0000 2016" to this format "2016-06-29 15:04:41" using date functions?
> 
> Thanks in advance.