[ 
https://issues.apache.org/jira/browse/NIFI-8110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-8110.
----------------------------------
    Resolution: Not A Problem

We're not doing anything specific here and Java date patterns should be 
followed:

[https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html]

The lower case 'y' should be used for the year. 'Y' should be used for the week 
year.

> Nifi date format shows wrong date
> ---------------------------------
>
>                 Key: NIFI-8110
>                 URL: https://issues.apache.org/jira/browse/NIFI-8110
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.11.4
>            Reporter: Vijendra Kulhade
>            Priority: Major
>
> I have been using nifi date format through expression.
> {code:java}
> ${now():toNumber():toDate():format("YYYY-MM-dd'T'HH:mm:ss'Z'")}
> {code}
> The output for this expression is coming 
> 2021-12-28T18:52:15Z
> Expected should be 
> 2020-12-28T18:52:15Z
> It works with 
> {code:java}
> ${now():toNumber():toDate():format("yyyy-MM-dd'T'HH:mm:ss'Z'")}{code}
> older version was supporting the later one 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to