Prabhu,
What is the output of *${input.4:substringBefore('-'):toDate('MMM')} *?
Cheers
On Mon, Apr 10, 2017 at 3:15 PM, prabhu Mahendran <[email protected]>
wrote:
> Jeff,
>
> My actual data is in English(US).
>
> consider sample data,
>
>
> *1,12990,Mahe,May-17*
> In this line i have get "May-17" and split it as 'May' and '17'.
>
> Using below expression language..,
>
>
>
> *${input.4:substringBefore('-'):toDate('MMM'):format('MM')}*In above
> query it could convert 'May' into '05' value.
>
> That can be work in my windows (English(US)).
>
> That Same query not work in French OS windows(French(Swiss)).
>
> It shows below error.
>
> *org.apache.nifi.expression.language.exception.IllegalAttributeExpression:Cannot
> parse attribute value as date:dateformat:MMM;attribute value:Mai*
>
> In that exception it shows attribute value is 'Mai'.Those value is in
> 'French' but i had given my data is in 'May' [english only].
>
> Can you suggest way to avoid this exception?
>
>
> On Fri, Apr 7, 2017 at 11:40 PM, Jeff <[email protected]> wrote:
>
>> Prabhu,
>>
>> I'll have to try this in NiFi myself. I'll let you know what I find.
>> What is the result of the EL you're using when you are trying it with
>> French?
>>
>> On Fri, Apr 7, 2017 at 1:03 AM prabhu Mahendran <[email protected]>
>> wrote:
>>
>>> jeff,
>>>
>>> Thanks for your reply.
>>>
>>> Attribute 'ds' having the '07/04/2017'.
>>>
>>> And convert that into month using UpdateAttribute.
>>>
>>> ${ds:toDate('dd/MM/yyyy'):format('MMM')}.
>>>
>>> if i use that code in windows having language English(India) then it
>>> worked.
>>>
>>> If i use that code in windows having language French(OS) it couldn't
>>> work.
>>>
>>> Can you suggest any way to solve that problem?
>>>
>>> On Fri, Apr 7, 2017 at 1:28 AM, Jeff <[email protected]> wrote:
>>>
>>> What is the expression language statement that you're attempting to use?
>>>
>>> On Thu, Apr 6, 2017 at 3:12 AM prabhu Mahendran <[email protected]>
>>> wrote:
>>>
>>> In NiFi How JVM Check language of machine?
>>>
>>> is that take any default language like English(US) else System DateTime
>>> Selected language?
>>>
>>> I face issue while converting datetime format into Month using
>>> expression language with NiFi package installed with French OS.
>>>
>>> But it worked in English(US) Selected language.
>>>
>>> Can anyone help me to resolve this?
>>>
>>>
>>>
>