Shubham Mehta
Shubham Mehta

Reputation: 81

I want to get yesterday's date time in camel route header

<setHeader headerName="order_creation_date">
    <simple resultType="java.lang.String">
        ${date-with-timezone:now:GMT-5:MM-dd-yyyy HH:mm:ss}
    </simple>
</setHeader>

the above code sets the current date with new york time zone in exchange header. I need 24 hours back date-time from current date in exchange header from camel XML

Upvotes: 0

Views: 3103

Answers (1)

Claus Ibsen
Claus Ibsen

Reputation: 55540

You can use now-24h as documented on the simple language https://github.com/apache/camel/blob/master/core/camel-base/src/main/docs/simple-language.adoc Mind that this requires a recent Camel version, so if it does not work tell us what Camel version you use.

Upvotes: 3

Related Questions