Using basic Java, the best I can come up with offhand is

String outdate = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new
Date(System.currentTimeMillis()  - 3600000), new StringBuffer(), new
FieldPosition(0)).toString();

I assume there's simpler.

Don

On Tue, Dec 6, 2011 at 12:07 PM, Castyn <eric.ben...@gmail.com> wrote:
> I am curious what the best way is to create a date string that supports
> xsl:date format?
>
> For instance if I wanted to create a date string for an hour ago in the
> format yyyy-MM-ddThh:mm:ss-offset what would the best way to go about it be?
> I know there are some simple commands such as ${date:now:...}, or that it
> could possible be done through a javascript function that just outputs the
> string, but I am curious if there is a better way or how to implement the
> simple statement.
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Date-String-Creation-tp5052753p5052753.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to