You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by titexe <ti...@yahoo.Fr> on 2010/01/12 18:26:13 UTC

Camel : Date Pattern

to retrieve the Date in the header of the message, i put the following code :

<setHeader headerName="Date">
        <simple>${date:now:yyyy-MM-dd'T'HH:mm:ss:SSS}</simple>
</setHeader>


This date format does not work? knowing that respects the date format
pattern: yyyy-MM-dd'T'HH:mm:ss.SSSZ

any idea?

Thank you in advance 
-- 
View this message in context: http://old.nabble.com/Camel-%3A-Date-Pattern-tp27131137p27131137.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel : Date Pattern

Posted by titexe <ti...@yahoo.Fr>.
I want to add another problem to the same bug:

Camel is incapable of generating this XML date format (XML (W3C) ISO 8601): 

Exemple :

2010-12-25T18 :25:01.037-08:00

However using this class exists in jar lib "commons-lang-2.4.jar" from
camel, we can succeed in having this date:

org.apache.commons.lang.time.DateFormatUtils.format (new Date (),
"yyyy-MM-dd'T'HH: mm: ss.SSSZZ)


Thank you also to take this problem into consideration in your next release
2.2 of camel

titexe



titexe wrote:
> 
> This date format is the XML date format:
> 
> The dateTime  XML is specified in the following form "YYYY-MM-DDThh: mm:
> ss"
> 
> 
> Claus Ibsen-2 wrote:
>> 
>> Hi
>> 
>> Check ticket
>> https://issues.apache.org/activemq/browse/CAMEL-2353
>> 
>> On Wed, Jan 13, 2010 at 6:37 AM, Claus Ibsen <cl...@gmail.com>
>> wrote:
>>> Hi
>>>
>>> The issue is that your pattern is complex and it contains additional :
>>> chars.
>>> I will get that fixed in the next release.
>>>
>>>
>>> On Tue, Jan 12, 2010 at 6:26 PM, titexe <ti...@yahoo.fr> wrote:
>>>>
>>>> to retrieve the Date in the header of the message, i put the following
>>>> code :
>>>>
>>>> <setHeader headerName="Date">
>>>>        <simple>${date:now:yyyy-MM-dd'T'HH:mm:ss:SSS}</simple>
>>>> </setHeader>
>>>>
>>>>
>>>> This date format does not work? knowing that respects the date format
>>>> pattern: yyyy-MM-dd'T'HH:mm:ss.SSSZ
>>>>
>>>> any idea?
>>>>
>>>> Thank you in advance
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Camel-%3A-Date-Pattern-tp27131137p27131137.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>> 
>> 
>> 
>> -- 
>> Claus Ibsen
>> Apache Camel Committer
>> 
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Camel-%3A-Date-Pattern-tp27131137p27242836.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel : Date Pattern

Posted by titexe <ti...@yahoo.Fr>.
This date format is the XML date format:

The dateTime  XML is specified in the following form "YYYY-MM-DDThh: mm: ss"


Claus Ibsen-2 wrote:
> 
> Hi
> 
> Check ticket
> https://issues.apache.org/activemq/browse/CAMEL-2353
> 
> On Wed, Jan 13, 2010 at 6:37 AM, Claus Ibsen <cl...@gmail.com>
> wrote:
>> Hi
>>
>> The issue is that your pattern is complex and it contains additional :
>> chars.
>> I will get that fixed in the next release.
>>
>>
>> On Tue, Jan 12, 2010 at 6:26 PM, titexe <ti...@yahoo.fr> wrote:
>>>
>>> to retrieve the Date in the header of the message, i put the following
>>> code :
>>>
>>> <setHeader headerName="Date">
>>>        <simple>${date:now:yyyy-MM-dd'T'HH:mm:ss:SSS}</simple>
>>> </setHeader>
>>>
>>>
>>> This date format does not work? knowing that respects the date format
>>> pattern: yyyy-MM-dd'T'HH:mm:ss.SSSZ
>>>
>>> any idea?
>>>
>>> Thank you in advance
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Camel-%3A-Date-Pattern-tp27131137p27131137.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/Camel-%3A-Date-Pattern-tp27131137p27141174.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel : Date Pattern

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Check ticket
https://issues.apache.org/activemq/browse/CAMEL-2353

On Wed, Jan 13, 2010 at 6:37 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> The issue is that your pattern is complex and it contains additional : chars.
> I will get that fixed in the next release.
>
>
> On Tue, Jan 12, 2010 at 6:26 PM, titexe <ti...@yahoo.fr> wrote:
>>
>> to retrieve the Date in the header of the message, i put the following code :
>>
>> <setHeader headerName="Date">
>>        <simple>${date:now:yyyy-MM-dd'T'HH:mm:ss:SSS}</simple>
>> </setHeader>
>>
>>
>> This date format does not work? knowing that respects the date format
>> pattern: yyyy-MM-dd'T'HH:mm:ss.SSSZ
>>
>> any idea?
>>
>> Thank you in advance
>> --
>> View this message in context: http://old.nabble.com/Camel-%3A-Date-Pattern-tp27131137p27131137.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Camel : Date Pattern

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

The issue is that your pattern is complex and it contains additional : chars.
I will get that fixed in the next release.


On Tue, Jan 12, 2010 at 6:26 PM, titexe <ti...@yahoo.fr> wrote:
>
> to retrieve the Date in the header of the message, i put the following code :
>
> <setHeader headerName="Date">
>        <simple>${date:now:yyyy-MM-dd'T'HH:mm:ss:SSS}</simple>
> </setHeader>
>
>
> This date format does not work? knowing that respects the date format
> pattern: yyyy-MM-dd'T'HH:mm:ss.SSSZ
>
> any idea?
>
> Thank you in advance
> --
> View this message in context: http://old.nabble.com/Camel-%3A-Date-Pattern-tp27131137p27131137.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus