I am using the date in a path in Camel:
fileName=${date:now:dd-MM-yyyy}
but what I need is now - 1 day. Is that possible?
I am using the date in a path in Camel:
fileName=${date:now:dd-MM-yyyy}
but what I need is now - 1 day. Is that possible?
Camel Simple language date variable supports command with offset:
Supported commands are:
nowfor current timestamp, [...] Command accepts offsets such as:now-24horheader.xxx+1hor evennow+1h30m-100.
So you can write your assigment as:
fileName=${date:now-1d:dd-MM-yyyy}
Note that -1d equals to -24h even not mentioned in the documentation.