Hi What Cron library do you use? If you use Quartz or Spring then I suggest to check their API as they may have methods to get the next expected fire time or something like that.
On Mon, Sep 16, 2013 at 8:14 AM, loganathan <[email protected]> wrote: > I have cron expression like 0 05 14 * * ? to start the route.But what my > requirement is i have to convert the same cron expression into proper date > format.The following is the code used for converting cron expression into > date format. > > CronExpression cronExpression = new CronExpression("0 05 14 * * ?"); > Date date1 = cronExpression.getNextValidTimeAfter(new Date()); > System.out.println("date1 date is>>>>>>..."+date1); > > Note:My requirement is not next valid,invalid,next,current time for the cron > expression that i have mentioned above.need is exact date format eg:Mon Sep > 16 14:15:00 IST 2013 for the above cron expression. > > Like that whatever cron expression i have pass i need exact date format for > the cron expression. > > Very Urgent.Anyone help is highly appreciated? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Problem-in-converting-Cron-expression-into-proper-date-format-tp5739498.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
