You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by camel_ch <ch...@gmail.com> on 2016/02/09 20:03:40 UTC

date:command:pattern

Hi 

I am trying the below  using camel route 

<to 
uri="file:{{file.path}}?noop=true&amp;fileExist=Append&amp;fileName=2767_${date:now:yyyyMMdd}.txt"
/>


But instead of 2767_20160209.txt  , it is giving 

2767_now:yyyyMMdd.txt

Any help is highly appreciated ! 



--
View this message in context: http://camel.465427.n5.nabble.com/date-command-pattern-tp5777485.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: date:command:pattern

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Feb 10, 2016 at 3:17 PM, Hans Orbaan <ha...@docdata.eu> wrote:
> Hi,
>
> Also you could try the more verbose way: $simple{date:now:yyyMMdd}.
>
> This is sometimes necessary. I am not sure why. Think it had something to do with loading from property files.
>

Ah yeah see the box on the of this page about the alt syntax
http://camel.apache.org/simple


> With kind regards,
>
> Hans Orbaan
>
> -----Oorspronkelijk bericht-----
> Van: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Verzonden: Wednesday 10 February 2016 15:00
> Aan: users@camel.apache.org
> Onderwerp: Re: date:command:pattern
>
> What version of Camel do you use?
>
> There is some examples here
> http://camel.apache.org/file-language.html
>
> At first glance your url looks correct.
>
> On Tue, Feb 9, 2016 at 8:03 PM, camel_ch <ch...@gmail.com> wrote:
>> Hi
>>
>> I am trying the below  using camel route
>>
>> <to
>> uri="file:{{file.path}}?noop=true&amp;fileExist=Append&amp;fileName=2767_${date:now:yyyyMMdd}.txt"
>> />
>>
>>
>> But instead of 2767_20160209.txt  , it is giving
>>
>> 2767_now:yyyyMMdd.txt
>>
>> Any help is highly appreciated !
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/date-command-pattern-tp5777485.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

RE: date:command:pattern

Posted by Hans Orbaan <ha...@docdata.eu>.
Hi,

Also you could try the more verbose way: $simple{date:now:yyyMMdd}.

This is sometimes necessary. I am not sure why. Think it had something to do with loading from property files.

With kind regards,

Hans Orbaan

-----Oorspronkelijk bericht-----
Van: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Verzonden: Wednesday 10 February 2016 15:00
Aan: users@camel.apache.org
Onderwerp: Re: date:command:pattern

What version of Camel do you use?

There is some examples here
http://camel.apache.org/file-language.html

At first glance your url looks correct.

On Tue, Feb 9, 2016 at 8:03 PM, camel_ch <ch...@gmail.com> wrote:
> Hi
>
> I am trying the below  using camel route
>
> <to
> uri="file:{{file.path}}?noop=true&amp;fileExist=Append&amp;fileName=2767_${date:now:yyyyMMdd}.txt"
> />
>
>
> But instead of 2767_20160209.txt  , it is giving
>
> 2767_now:yyyyMMdd.txt
>
> Any help is highly appreciated !
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/date-command-pattern-tp5777485.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: date:command:pattern

Posted by Claus Ibsen <cl...@gmail.com>.
What version of Camel do you use?

There is some examples here
http://camel.apache.org/file-language.html

At first glance your url looks correct.

On Tue, Feb 9, 2016 at 8:03 PM, camel_ch <ch...@gmail.com> wrote:
> Hi
>
> I am trying the below  using camel route
>
> <to
> uri="file:{{file.path}}?noop=true&amp;fileExist=Append&amp;fileName=2767_${date:now:yyyyMMdd}.txt"
> />
>
>
> But instead of 2767_20160209.txt  , it is giving
>
> 2767_now:yyyyMMdd.txt
>
> Any help is highly appreciated !
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/date-command-pattern-tp5777485.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2